/* Structure Panel Styles */
.digiblocks-structure-panel {
    margin: 0;

    .digiblocks-structure-list {
        margin: 0 0 12px 0;
        padding: 0;
    }

    .digiblocks-structure-item {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 4px;
        margin-bottom: 8px;
        transition: all 0.2s ease;
        position: relative;

        &.is-dragging {
            opacity: 0.4;
        }

        &.drop-target {
            border-color: #2271b1;

            &::before {
                content: "";
                position: absolute;
                top: -5px;
                left: 0;
                right: 0;
                height: 2px;
                background-color: #2271b1;
            }
        }

        &-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px;
            background: #f9f9f9;
            border-radius: 4px 4px 0 0;
            cursor: grab;

            &:active {
                cursor: grabbing;
            }
        }

        &-title {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px;
            background: transparent;
            border: none;
            cursor: pointer;
            text-align: left;
            font-size: 13px;
            color: #1d2327;
            transition: color 0.2s ease;
            min-width: 0;
            overflow: hidden;

            &:hover {
                color: #2271b1;
            }
        }

        &-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            flex-shrink: 0;

            svg {
                width: 16px;
                height: 16px;
                fill: currentColor;
            }
        }

        &-text {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }

        &-actions {
            display: flex;
            gap: 4px;
            flex-shrink: 0;
        }

        &-action {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 2px;
            cursor: pointer;
            color: #8c8f94;
            transition: all 0.2s ease;
            flex-shrink: 0;

            &:hover {
                background: #f0f0f1;
                color: #1d2327;
            }

            &-remove:hover {
                color: #d63638;
            }

            .dashicons {
                width: 18px;
                height: 18px;
                font-size: 18px;
            }
        }

        &-content {
            padding: 12px;
            border-top: 1px solid #ddd;
        }

        &-control {
            margin-bottom: 16px;

            &:last-child {
                margin-bottom: 0;
            }
        }

        &-label {
            display: block;
            margin-bottom: 8px;
            font-size: 11px;
            font-weight: 500;
            text-transform: uppercase;
            color: #1d2327;
            letter-spacing: 0.5px;
        }

        &-input {
            width: 100%;
            padding: 8px;
            border: 1px solid #ddd;
            border-radius: 2px;
            font-size: 13px;
            line-height: 1.4;
            transition: border-color 0.2s ease;

            &:focus {
                border-color: #2271b1;
                outline: none;
                box-shadow: 0 0 0 1px #2271b1;
            }

            &.block-editor-rich-text__editable {
                min-height: 40px;
            }
        }
    }

    .digiblocks-structure-add-item {
        padding-top: 4px;
    }

    .digiblocks-structure-add-button.has-text {
        width: 100%;
        justify-content: center;
        height: 40px;
    }
}
