/**
 * Design Selector Admin Styles
 * Styles for the form design selector in wp-admin
 */
.fus-design-selector {
    margin: 20px 0;

    .description {
        margin-bottom: 20px;
        font-size: 13px;
        color: #666;
        line-height: 1.4;
    }

    .design-options-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
        margin-bottom: 25px;

        @media (max-width: 768px) {
            grid-template-columns: 1fr;
        }
    }

    .design-option {
        border: 2px solid #e0e0e0;
        border-radius: 8px;
        padding: 0;
        overflow: hidden;
        background: white;
        transition: all 0.2s ease;
        cursor: pointer;
        position: relative;

        &:hover:not(.disabled) {
            border-color: #0073aa;
            box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
            transform: translateY(-2px);
        }

        &.selected {
            border-color: #0073aa;
            background-color: #f0f8ff;
            box-shadow: 0 0 0 1px #0073aa;
        }

        &.disabled {
            border-color: #ddd;
            background-color: #f9f9f9;
            cursor: not-allowed;
            opacity: 0.7;

            &:hover {
                transform: none;
                box-shadow: none;
            }
        }

        label {
            display: block;
            cursor: inherit;
            padding: 0;
            margin: 0;
            height: 100%;

            input[type="radio"] {
                position: absolute;
                z-index: 2;
                top: 5px;
                left: 5px;

                &:disabled {
                    cursor: not-allowed;
                }
            }
        }

        .design-preview {
            position: relative;
            background: #f8f9fa;
            height: 150px;
            overflow: hidden;
            display: flex;
            align-items: center;
            justify-content: center;

            img {
                height: 100%;
                object-fit: cover;
                transition: transform 0.2s ease;
            }

            .overlay-disabled {
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: rgba(0, 0, 0, 0.6);
                display: flex;
                align-items: center;
                justify-content: center;

                .lock-icon {
                    font-size: 32px;
                    opacity: 0.8;
                }
            }
        }

        .design-info {
            padding: 15px;

            .design-name {
                margin: 0 0 8px 0;
                font-size: 14px;
                font-weight: 600;
                color: #1d2327;
                display: flex;
                align-items: center;
                gap: 8px;

                .pro-badge {
                    background: #ff6b35;
                    color: white;
                    padding: 2px 6px;
                    border-radius: 3px;
                    font-size: 10px;
                    font-weight: 700;
                    text-transform: uppercase;
                    letter-spacing: 0.5px;
                }
            }

            .pro-notice {
                margin: 0;
                font-size: 12px;
                color: #d63638;
                font-weight: 500;
            }
        }

        // Hover effects for non-disabled options
        &:not(.disabled):hover {
            .design-preview img {
                transform: scale(1.05);
            }
        }

        // Selected state styling
        &.selected {
            .design-info .design-name {
                color: #0073aa;
            }
        }
    }

    .pro-upgrade-notice {
        margin-top: 20px;
        padding: 20px;
        background: #fff3cd;
        border: 1px solid #ffeaa7;
        border-radius: 6px;
        border-left: 4px solid #ff6b35;

        h4 {
            margin: 0 0 8px 0;
            color: #856404;
            font-size: 16px;
            font-weight: 600;
        }

        p {
            margin: 0 0 15px 0;
            color: #856404;
            line-height: 1.4;
        }

        .button-primary {
            background: #ff6b35;
            border-color: #ff6b35;
            color: white;
            text-decoration: none;
            font-weight: 600;
            padding: 8px 16px;
            border-radius: 4px;
            transition: all 0.2s ease;

            &:hover,
            &:focus {
                background: #e55a2b;
                border-color: #e55a2b;
                color: white;
                transform: translateY(-1px);
                box-shadow: 0 2px 4px rgba(229, 90, 43, 0.3);
            }
        }
    }
}

// Additional responsive adjustments
@media (max-width: 600px) {
    .fus-design-selector {
        .design-options-grid {
            gap: 15px;
        }

        .design-option {
            .design-preview {
                height: 120px;
            }

            .design-info {
                padding: 12px;
            }
        }

        .pro-upgrade-notice {
            padding: 15px;
        }
    }
}

// WordPress admin table compatibility
.form-table .fus-design-selector {
    margin: 0;

    .design-options-grid {
        margin-bottom: 20px;
    }
}
