/* ═══════════════════════════════════════════════════════════
   AUTH MODAL — Customer Login/Register/Reservations
   Matches luxury design: Montserrat/Playfair, gold #A97708, warm tones
   ═══════════════════════════════════════════════════════════ */

/* ── Overlay ─────────────────────────────────────────────── */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}
.auth-overlay.is-open {
    display: flex;
}

/* ── Modal Card ──────────────────────────────────────────── */
.auth-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: authSlideUp 0.25s ease;
}
@keyframes authSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ──────────────────────────────────────────────── */
.auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}
.auth-header h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}
.auth-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #777;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}
.auth-close:hover {
    background: #f5f3f0;
    color: #1a1a1a;
}

/* ── Body ────────────────────────────────────────────────── */
.auth-body {
    padding: 20px 24px 24px;
}

/* ── View containers (only one visible at a time) ────────── */
.auth-view { display: none; }
.auth-view.is-active { display: block; }

/* ── Form Elements ───────────────────────────────────────── */
.auth-field {
    margin-bottom: 16px;
}
.auth-field label {
    display: block;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 6px;
}
.auth-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e8e4df;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
/* ── Password eye toggle ─────────────────────────────────── */
.auth-field-pw {
    position: relative;
}
.auth-field-pw input {
    padding-right: 42px;
}
.auth-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #999;
    font-size: 15px;
    line-height: 1;
    transition: color 0.2s;
}
.auth-pw-toggle:hover {
    color: #555;
}

.auth-field input:focus {
    border-color: #A97708;
}
.auth-field input::placeholder {
    color: #bbb;
}
.auth-field .auth-error-text {
    font-size: 12px;
    color: #c0392b;
    margin-top: 4px;
    display: none;
}
.auth-field.has-error input {
    border-color: #c0392b;
}
.auth-field.has-error .auth-error-text {
    display: block;
}

/* ── Name row (first + last side by side) ────────────────── */
.auth-name-row {
    display: flex;
    gap: 12px;
}
.auth-name-row .auth-field {
    flex: 1;
}

/* ── Buttons ─────────────────────────────────────────────── */
.auth-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn-gold {
    background: #A97708;
    color: #1a1a1a;
}
.auth-btn-gold:hover:not(:disabled) {
    background: #936807;
}

.auth-btn-google {
    background: #fff;
    color: #333;
    border: 1.5px solid #e8e4df;
    margin-top: 12px;
}
.auth-btn-google:hover:not(:disabled) {
    background: #f9f9f9;
    border-color: #ccc;
}
.auth-btn-google svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ── Divider ─────────────────────────────────────────────── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #999;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e8e4df;
}

/* ── Links / Toggle ──────────────────────────────────────── */
.auth-toggle {
    text-align: center;
    margin-top: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #777;
}
.auth-toggle a {
    color: #A97708;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.auth-toggle a:hover {
    text-decoration: underline;
}

/* ── Forgot password link ────────────────────────────────── */
.auth-forgot {
    text-align: right;
    margin: -4px 0 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
}
.auth-forgot a {
    color: #A97708;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.auth-forgot a:hover {
    text-decoration: underline;
}
.auth-forgot-desc {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 16px;
}

/* ── Status message ──────────────────────────────────────── */
.auth-status {
    padding: 10px 14px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}
.auth-status.is-error {
    display: block;
    background: #fdf0ef;
    color: #c0392b;
    border: 1px solid #f5c6cb;
}
.auth-status.is-success {
    display: block;
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #a9dfbf;
}

/* ── Spinner ─────────────────────────────────────────────── */
.auth-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0,0,0,0.15);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: authSpin 0.6s linear infinite;
    display: none;
}
.auth-btn.is-loading .auth-spinner {
    display: inline-block;
}
.auth-btn.is-loading .auth-btn-text {
    display: none;
}
@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* ═══ RESERVATIONS VIEW ══════════════════════════════════════ */

.auth-reservations-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.auth-reservations-header h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}
.auth-back-btn {
    background: none;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #A97708;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-weight: 600;
}
.auth-back-btn:hover {
    background: #faf9f7;
}

/* ── Reservation Cards ───────────────────────────────────── */
.auth-res-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-res-card {
    background: #faf9f7;
    border-left: 3px solid #a67c00;
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}
.auth-res-card:hover {
    background: #f5f3f0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.auth-res-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.auth-res-conf {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #1a1a1a;
}
.auth-res-status {
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.auth-res-status.status-completed {
    background: #eafaf1;
    color: #27ae60;
}
.auth-res-status.status-confirmed {
    background: #ebf5fb;
    color: #2980b9;
}
.auth-res-status.status-pending {
    background: #fef9e7;
    color: #f39c12;
}
.auth-res-route {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
    line-height: 1.4;
}
.auth-res-route i {
    color: #A97708;
    width: 14px;
    text-align: center;
    margin-right: 6px;
}
.auth-res-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #777;
}
.auth-res-meta i {
    margin-right: 4px;
    color: #999;
}
.auth-res-fare {
    font-weight: 700;
    color: #1a1a1a;
}

/* ── Pagination ──────────────────────────────────────────── */
.auth-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #777;
}
.auth-pagination button {
    background: none;
    border: 1.5px solid #e8e4df;
    border-radius: 6px;
    padding: 6px 12px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    cursor: pointer;
    color: #1a1a1a;
    transition: border-color 0.2s, background 0.2s;
}
.auth-pagination button:hover:not(:disabled) {
    border-color: #A97708;
    background: #faf9f7;
}
.auth-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Empty State ─────────────────────────────────────────── */
.auth-empty {
    text-align: center;
    padding: 32px 16px;
    font-family: 'Montserrat', sans-serif;
    color: #999;
}
.auth-empty i {
    font-size: 36px;
    color: #ddd;
    margin-bottom: 12px;
    display: block;
}
.auth-empty p {
    font-size: 14px;
    margin: 0;
}

/* ── Profile (logged-in) View ────────────────────────────── */
.auth-profile-info {
    text-align: center;
    margin-bottom: 20px;
}
.auth-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #A97708;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.auth-profile-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 4px;
}
.auth-profile-email {
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    color: #777;
}

.auth-menu-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.auth-menu-list li {
    border-bottom: 1px solid #f0ede8;
}
.auth-menu-list li:last-child {
    border-bottom: none;
}
.auth-menu-list button {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 12px 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s;
}
.auth-menu-list button:hover {
    color: #A97708;
}
.auth-menu-list button i {
    width: 18px;
    text-align: center;
    color: #A97708;
}

.auth-btn-outline {
    background: none;
    color: #c0392b;
    border: 1.5px solid #e8e4df;
}
.auth-btn-outline:hover:not(:disabled) {
    background: #fdf0ef;
    border-color: #f5c6cb;
}

/* ═══ RESPONSIVE ═════════════════════════════════════════════ */

@media (max-width: 480px) {
    .auth-modal {
        max-width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 95vh;
    }
    .auth-overlay {
        align-items: flex-end;
        padding: 0;
    }
    .auth-header h2 {
        font-size: 20px;
    }
    .auth-name-row {
        flex-direction: column;
        gap: 0;
    }
    .auth-body {
        padding: 16px 20px 20px;
    }
}
