/**
 * Authentication Pages Styles
 * Used by login, signup, password reset, email confirmation pages
 */

/* Body & Container */
.auth-body {
    background: linear-gradient(135deg, var(--primary-subtle) 0%, var(--white) 100%);
    min-height: 100vh;
}

.auth-card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 
                0 8px 10px -6px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.5s ease-out;
}

/* Logo & Branding */
.auth-logo {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.auth-logo-img {
    max-width: 150px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.auth-tagline {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* Page Titles & Icons */
.auth-page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.auth-page-subtitle {
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.6;
}

.auth-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-subtle) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.auth-page-icon {
    font-size: 2.5rem;
    color: var(--primary);
}

/* Success & Error Icons */
.auth-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--success-light) 0%, #d1f4e0 100%);
    border-radius: 50%;
    animation: scaleIn 0.6s ease-out;
}

.auth-success-icon i {
    font-size: 3.5rem;
    color: var(--success);
}

.auth-error-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--error-light) 0%, #ffe0e0 100%);
    border-radius: 50%;
    animation: shake 0.6s ease-out;
}

.auth-error-icon i {
    font-size: 3.5rem;
    color: var(--error);
}

/* Form Styles */
.auth-form {
    margin-top: 2rem;
}

.auth-form .form-control {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--gray-300);
    transition: all 0.3s ease;
}

.auth-form .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(10, 81, 91, 0.25);
}

.auth-form .form-label {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Override font-size for name fields */
.auth-form #id_first_name,
.auth-form #id_last_name {
    font-size: 1rem !important;
}

/* Links */
.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.auth-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-300);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* Buttons */
.btn-auth-primary {
    background: #ed6d16;
    border: none;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(237, 109, 22, 0.3);
}

.btn-auth-primary:hover {
    background: #d45a0f;
    border: none;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(237, 109, 22, 0.4);
}

.btn-auth-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(10, 81, 91, 0.5);
}

.btn-auth-primary:active {
    transform: translateY(0);
}

/* Alert Messages */
.auth-alert {
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: none;
}

.auth-info-box {
    background-color: var(--info-light);
    color: var(--info-dark);
    border: 1px solid var(--info);
    border-radius: 0.5rem;
}

/* Checkbox */
.auth-checkbox {
    margin-top: 1rem;
}

.auth-checkbox .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.auth-checkbox .form-check-label {
    color: var(--gray-700);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

/* Responsive Adjustments */
@media (max-width: 576px) {
    .auth-card {
        margin: 1rem;
    }
    
    .auth-logo {
        font-size: 2rem;
    }
    
    .auth-page-title {
        font-size: 1.5rem;
    }
    
    .auth-icon-wrapper {
        width: 70px;
        height: 70px;
    }
    
    .auth-page-icon {
        font-size: 2rem;
    }
    
    .auth-success-icon,
    .auth-error-icon {
        width: 80px;
        height: 80px;
    }
    
    .auth-success-icon i,
    .auth-error-icon i {
        font-size: 3rem;
    }
}

/* Loading State */
.btn-auth-primary.loading {
    position: relative;
    color: transparent;
}

.btn-auth-primary.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

