/* /auth/css/auth.css */

/* ================================== */
/* FORM STYLES (What you already have)*/
/* ================================== */
.auth-container {
    max-width: 420px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.auth-container h1 {
    text-align: center;
    color: #ad5207;
    margin-top: 0;
    margin-bottom: 1.5rem;
}

.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
}

.auth-form-group input[type="text"],
.auth-form-group input[type="email"],
.auth-form-group input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    box-sizing: border-box; /* Important */
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-group input:focus {
    border-color: #ad5207;
    box-shadow: 0 0 0 2px rgba(173, 82, 7, 0.2);
    outline: none;
}

.auth-btn {
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 6px;
    background-color: #ad5207;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s;
}

.auth-btn:hover {
    background-color: #e88e07;
}

.auth-btn:disabled {
    background-color: #f3e0d1;
    cursor: not-allowed;
}

.auth-text-center {
    text-align: center;
}

.auth-link {
    color: #ad5207;
    text-decoration: none;
    cursor: pointer;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #6B7280;
    margin: 1.5rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #E5E7EB;
}

.auth-divider:not(:empty)::before {
    margin-right: .25em;
}

.auth-divider:not(:empty)::after {
    margin-left: .25em;
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem;
    background: #fff;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s, border-color 0.2s;
}

.google-btn:hover {
    background-color: #f9fafb;
    border-color: #b0b4b9;
}

.google-btn img {
    width: 20px;
    height: 20px;
}

.auth-message {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.auth-message.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.auth-message.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

#resend-otp-link {
    display: inline-block;
    margin-top: 1rem;
}


/* ================================== */
/* MODAL STYLES (THE MISSING PART)    */
/* ================================== */

.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: none; /* Hidden by default */
}

.auth-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    background: #fff;
    border-radius: 8px;
    z-index: 10001;
    width: 90%;
    max-width: 440px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none; /* Hidden by default */
}

/* When active */
.auth-modal-overlay.active,
.auth-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.auth-modal-overlay.active {
    transform: none; /* Overlay doesn't scale */
}


.auth-modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: #9CA3AF;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}
.auth-modal-close:hover {
    color: #374151;
}

.auth-modal-content {
    padding: 0;
    max-height: 80vh;
    overflow-y: auto;
}

/* Make the partial container fit the modal */
.auth-modal-content .auth-container {
    margin: 0;
    box-shadow: none;
    padding: 2.5rem 2rem 2rem; /* More padding for modal */
}

/* Loader for modal content */
.auth-loader {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.auth-loader::after {
    content: '';
    display: block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top-color: #ad5207;
    border-radius: 50%;
    animation: auth-spin 1s linear infinite;
}

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