/* Auth pages styling for Clerk components */

/* 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 #e5e7eb;
}

/* 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: #eff6ff;
    border-radius: 0.75rem;
    padding: 1rem;
}

.auth-benefits-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e40af;
    margin-bottom: 0.75rem;
}

.auth-benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
    color: #1d4ed8;
}

.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;
}
