/* Auth pages styling for Clerk components */

/* Full-page backdrop: theme-aware gradient with soft radial glows.
   Replaces the hardcoded light gradient so dark mode works too. */
.auth-page {
    background:
        radial-gradient(700px circle at 20% 10%, rgba(59, 130, 246, 0.08), transparent 60%),
        radial-gradient(700px circle at 80% 90%, rgba(99, 102, 241, 0.08), transparent 60%),
        linear-gradient(135deg, var(--color-bg-primary) 0%, var(--color-bg-secondary) 100%);
}

/* Loading spinner */
.auth-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.auth-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Clerk component overrides */
/* Constrain all images and SVGs inside Clerk components */
.cl-rootBox img,
.cl-card img,
.cl-socialButtonsBlockButton img,
.cl-socialButtonsIconButton img,
[id*="clerk"] img {
    max-width: 24px !important;
    max-height: 24px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
}

/* Constrain SVG icons */
.cl-rootBox svg,
.cl-card svg,
.cl-socialButtonsBlockButton svg,
.cl-socialButtonsIconButton svg,
[id*="clerk"] svg {
    max-width: 20px !important;
    max-height: 20px !important;
    width: 20px !important;
    height: 20px !important;
}

/* Social button icons specifically */
.cl-socialButtonsBlockButton__icon,
.cl-socialButtonsIconButton__icon {
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.cl-socialButtonsBlockButton__icon img,
.cl-socialButtonsIconButton__icon img,
.cl-socialButtonsBlockButton__icon svg,
.cl-socialButtonsIconButton__icon svg {
    max-width: 20px !important;
    max-height: 20px !important;
    width: 20px !important;
    height: 20px !important;
}

/* User avatar/profile images can be larger */
.cl-avatarBox img,
.cl-userButtonAvatarBox img,
.cl-userPreviewAvatarBox img {
    max-width: 40px !important;
    max-height: 40px !important;
}

/* Auth card styling */
.auth-card {
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-xl);
    background: var(--color-bg-primary);
    box-shadow: var(--shadow-md);
}

/* Ensure Clerk forms fit properly */
.cl-rootBox {
    width: 100% !important;
}

.cl-card {
    width: 100% !important;
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
}

/* Form input styling consistency */
.cl-formFieldInput {
    border-radius: 0.5rem !important;
}

/* Button styling consistency */
.cl-formButtonPrimary {
    border-radius: 0.5rem !important;
}

.auth-benefits-card {
    background-color: var(--color-primary-50);
    border: 1px solid var(--color-primary-100);
    border-radius: var(--radius-xl);
    padding: 1.25rem;
}

[data-bs-theme="dark"] .auth-benefits-card {
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.auth-benefits-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary-800);
    margin-bottom: 0.75rem;
}

[data-bs-theme="dark"] .auth-benefits-title {
    color: var(--color-primary-300);
}

.auth-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: var(--color-primary-700);
}

[data-bs-theme="dark"] .auth-benefits-list {
    color: var(--color-primary-200);
}

.auth-benefit-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.auth-benefit-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    color: #3b82f6;
    margin-right: 0.5rem;
}

/* ── Auth form wrapper ─────────────────────────────────────────────────── */
.auth-form-wrap { max-width: 440px; }
