// Auth Settings Page Styles

.auth-settings-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
}

.auth-settings-header {
    margin-bottom: 30px;

    h1 {
        font-size: 28px;
        font-weight: 700;
        color: #1e293b;
        margin-bottom: 8px;
    }

    p {
        font-size: 16px;
        color: #64748b;
    }
}

// Tab Navigation
.auth-settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e5e7eb;

    .tab-button {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 14px 24px;
        background: transparent;
        border: none;
        border-bottom: 3px solid transparent;
        color: #64748b;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        white-space: nowrap;
        position: relative;
        bottom: -2px;

        svg {
            font-size: 20px;
        }

        &:hover {
            color: #4a6cf7;
            background: rgba(74, 108, 247, 0.05);
        }

        &.active {
            color: #4a6cf7;
            border-bottom-color: #4a6cf7;
            background: rgba(74, 108, 247, 0.05);
        }
    }
}

.auth-settings-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;

    .spinner {
        width: 40px;
        height: 40px;
        border: 4px solid #f3f4f6;
        border-top-color: #4a6cf7;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    p {
        margin-top: 16px;
        color: #64748b;
        font-size: 14px;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.auth-settings-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.settings-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    position: relative;

    h2 {
        font-size: 20px;
        font-weight: 600;
        color: #1e293b;
        margin-bottom: 24px;
        display: flex;
        align-items: center;
        gap: 10px;

        svg {
            color: #4a6cf7;
            font-size: 24px;
        }
    }

    &.pro-locked {

        .settings-list,
        .settings-grid {
            // filter: blur(1.5px);
            opacity: 0.8;
            pointer-events: none;
            user-select: none;
        }
    }
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.settings-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 8px;

    &.disabled {
        opacity: 0.5;
        pointer-events: none;
    }

    label {
        font-size: 14px;
        font-weight: 600;
        color: #374151;
        display: flex;
        align-items: center;
        gap: 8px;

        .setting-icon {
            font-size: 18px;
            color: #4a6cf7;
        }

        .lock-icon {
            font-size: 16px;
            color: #9ca3af;
            margin-left: auto;
        }
    }

    select,
    input[type="text"],
    input[type="number"] {
        padding: 10px 14px;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        font-size: 14px;
        color: #1e293b;
        transition: all 0.2s ease;

        &:focus {
            outline: none;
            border-color: #4a6cf7;
            box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.1);
        }

        &:disabled {
            background: #f9fafb;
            cursor: not-allowed;
        }
    }

    input[type="number"] {
        max-width: 120px;
    }

    small {
        font-size: 12px;
        color: #6b7280;
        line-height: 1.4;
    }

    &.checkbox {
        flex-direction: row;
        align-items: flex-start;
        gap: 12px;

        label {
            flex: 1;
            font-weight: 500;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 10px;

            input[type="checkbox"] {
                width: 18px;
                height: 18px;
                cursor: pointer;
                accent-color: #4a6cf7;
            }

            span {
                flex: 1;
            }
        }

        small {
            flex-basis: 100%;
            margin-left: 28px;
        }
    }

    &.toggle {
        .toggle-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 20px;
            width: 100%;
        }

        .toggle-info {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 4px;

            .toggle-label {
                font-size: 14px;
                font-weight: 600;
                color: #374151;
            }

            small {
                margin: 0;
            }
        }

        .toggle-switch {
            position: relative;
            display: inline-block;
            width: 48px;
            height: 26px;
            flex-shrink: 0;

            input[type="checkbox"] {
                opacity: 0;
                width: 0;
                height: 0;

                &:checked+.toggle-slider {
                    background: linear-gradient(135deg, #4a6cf7, #3c57d0);

                    &:before {
                        transform: translateX(22px);
                    }
                }

                &:focus+.toggle-slider {
                    box-shadow: 0 0 0 3px rgba(74, 108, 247, 0.2);
                }
            }

            .toggle-slider {
                position: absolute;
                cursor: pointer;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: #cbd5e1;
                transition: all 0.3s ease;
                border-radius: 26px;

                &:before {
                    position: absolute;
                    content: "";
                    height: 20px;
                    width: 20px;
                    left: 3px;
                    bottom: 3px;
                    background-color: white;
                    transition: all 0.3s ease;
                    border-radius: 50%;
                    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
                }

                &:hover {
                    background-color: #94a3b8;
                }
            }

            input[type="checkbox"]:checked+.toggle-slider:hover {
                background: linear-gradient(135deg, #3c57d0, #2d42a0);
            }
        }
    }
}

.settings-actions {
    display: flex;
    justify-content: flex-end;
    padding: 20px 0;

    &.pro-locked {
        position: relative;
    }

    .save-settings-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 32px;
        background: linear-gradient(135deg, #4a6cf7, #3c57d0);
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 4px 12px rgba(74, 108, 247, 0.3);
        position: relative;

        svg {
            font-size: 20px;
        }

        &:hover:not(:disabled) {
            background: linear-gradient(135deg, #3c57d0, #2d42a0);
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(74, 108, 247, 0.4);
        }

        &:active:not(:disabled) {
            transform: translateY(0);
        }

        &:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }
    }

    &.pro-locked .save-settings-btn {
        filter: blur(1px);
        opacity: 0.5;
    }
}

// Responsive design
@media (max-width: 768px) {
    .auth-settings-container {
        padding: 20px 15px;
    }

    .auth-settings-header {
        margin-bottom: 20px;

        h1 {
            font-size: 24px;
        }

        p {
            font-size: 14px;
        }
    }

    .auth-settings-tabs {
        margin-bottom: 20px;
        gap: 4px;

        .tab-button {
            padding: 12px 16px;
            font-size: 14px;

            svg {
                font-size: 18px;
            }
        }
    }

    .settings-section {
        padding: 20px;

        h2 {
            font-size: 18px;
        }
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .settings-actions {
        .save-settings-btn {
            width: 100%;
            justify-content: center;
        }
    }
}

// Pro Lock Overlay
.pro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    // backdrop-filter: blur(2px);
    // -webkit-backdrop-filter: blur(2px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;

    &:hover {
        background: rgba(255, 255, 255, 0.4);

        .pro-badge {
            transform: scale(1.05);
            box-shadow: 0 6px 20px rgba(74, 108, 247, 0.4);
        }
    }

    .pro-badge {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 20px;
        background: linear-gradient(135deg, #4a6cf7, #3c57d0);
        color: white;
        border-radius: 50px;
        font-size: 14px;
        font-weight: 700;
        box-shadow: 0 4px 16px rgba(74, 108, 247, 0.3);
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.5px;

        svg {
            font-size: 18px;
            animation: lock-pulse 2s ease-in-out infinite;
        }
    }
}

// For save button overlay - smaller badge
.settings-actions .pro-overlay {
    border-radius: 8px;

    .pro-badge {
        padding: 8px 16px;
        font-size: 12px;

        svg {
            font-size: 16px;
        }
    }
}

@keyframes lock-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

// Tablet and mobile - vertical tabs
@media (max-width: 768px) {
    .auth-settings-tabs {
        flex-direction: column;
        border-bottom: none;
        border-right: 2px solid #e5e7eb;
        gap: 8px;

        .tab-button {
            width: 100%;
            justify-content: flex-start;
            padding: 14px 20px;
            border-bottom: none;
            border-right: 3px solid transparent;
            bottom: 0;

            &.active {
                border-bottom: none;
                border-right-color: #4a6cf7;
            }
        }
    }

    .pro-overlay {
        .pro-badge {
            padding: 8px 16px;
            font-size: 13px;

            svg {
                font-size: 16px;
            }
        }
    }
}

@media (max-width: 480px) {
    .auth-settings-tabs {
        .tab-button {
            padding: 12px 16px;
            font-size: 14px;

            svg {
                font-size: 18px;
            }
        }
    }

    .pro-overlay {
        .pro-badge {
            padding: 7px 14px;
            font-size: 12px;

            svg {
                font-size: 14px;
            }
        }
    }
}