/* ============================================
   customer-style.css – Legato 礼驾
   Consolidated styles from all customer-facing files
   ============================================ */

/* ===== ROOT VARIABLES ===== */
:root {
    --bg: #0a0a0a;
    --bg-dark: rgba(0, 0, 0, 0.95);
    --surface: #111111;
    --surface-dark: #121212;
    --gold: #f5d04e;
    --gold-dark: #d4af37;
    --gold-bright: #ffd700;
    --gold-glow: rgba(245, 208, 78, 0.2);
    --text: #f0f0f0;
    --text-muted: #aaaaaa;
    --text-light: rgba(255, 255, 255, 0.9);
    --border: #333;
    --border-light: rgba(255, 255, 255, 0.08);
    --error: #ff6b6b;
    --success: #4caf50;
    --danger: #f44336;
    --neutral: #757575;
    --yellow-warning: #ffc107;
}

/* ===== GLOBAL RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.customer-area {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Login/Registration standalone pages */
body:has(.login-container, .register-container) {
    background: linear-gradient(135deg, #0a0a0a 0%, #111111 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ===== MAIN CONTAINERS ===== */
.customer-main {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 24px 16px 100px;
    box-sizing: border-box;
    flex: 1 0 auto;
    overflow-y: auto;
}

.customer-main.dashboard {
    max-width: 1200px;
}

.customer-container {
    width: 100%;
    max-width: 800px;
    padding: 20px;
}

.customer-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    text-align: center;
}

/* ===== HEADER & LOGO ===== */
.customer-header {
    background: linear-gradient(to bottom, #1a1a1a, var(--surface));
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}
/* ===== LOGO SIZES ===== */
/* Use classes instead of generic selector */
.logo-img-small {
    max-width: 50px;
    height: auto;
}

.logo-img-large {
    max-width: 200px;
    height: auto;
}


.logo-img {
    max-width: 160px;
    height: auto;
}

.logo {
    font-size: 3rem;
    font-weight: 800;
    color: var(--gold);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.logo span {
    font-size: 1.8rem;
    opacity: 0.9;
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-size: 1.8rem;
    margin: 16px 0 8px;
    color: #fff;
    font-weight: 600;
}

.subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 32px;
}

/* ===== CARDS & SURFACES ===== */
.card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.transparent-card {
    background: var(--bg-dark) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    color: var(--text-light);
    border-radius: 24px !important;
    padding: 32px !important;
}

/* ===== FORMS & INPUTS ===== */
.form-group {
    margin-bottom: 24px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--text-muted);
}

input, .w3-input {
    width: 100%;
    padding: 14px 16px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, .w3-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 208, 78, 0.2);
    background: #222;
}

input.error {
    border-color: var(--error);
}

.w3-input {
    padding-right: 110px !important;
}

/* Name row (two columns) */
.name-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.name-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ===== BUTTONS ===== */
.login-btn, .register-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    margin-top: 12px;
}

.login-btn:hover, .register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 208, 78, 0.4);
}

.login-btn:disabled, .register-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    transition: all 0.25s;
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--gold-glow);
}

/* W3CSS Gold overrides */
.w3-gold,
.w3-button.w3-gold,
.btn-primary {
    background-color: var(--gold) !important;
    color: #000 !important;
    border-radius: 12px !important;
    transition: all 0.25s ease;
}

.w3-gold:hover,
.w3-button.w3-gold:hover {
    background-color: var(--gold-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

.w3-gold-bright {
    background-color: var(--gold-bright) !important;
    color: #000 !important;
}

/* SSO Buttons */
.sso-btn {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}

.sso-google {
    background: #fff;
    color: #333;
}

.sso-google:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
}

.sso-facebook {
    background: #1877f2;
    color: white;
}

.sso-facebook:hover {
    background: #1664d9;
    transform: translateY(-1px);
}

.sso-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Cancel Button */
.cancel-btn {
    background: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    color: #f44336;
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.cancel-btn:hover {
    background: #f44336;
    color: white;
}

/* View Details Button */
.view-details-btn {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.view-details-btn:hover {
    background: var(--gold);
    color: #000;
}

/* ===== MESSAGES & NOTIFICATIONS ===== */
.message {
    margin-top: 16px;
    min-height: 20px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.message.error {
    background: rgba(255, 107, 107, 0.1);
    color: var(--error);
}

.message.success {
    background: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

/* ===== LINKS ===== */
.links {
    margin-top: 24px;
    font-size: 0.95rem;
}

.links a {
    color: var(--gold);
    text-decoration: none;
}

.links a:hover {
    text-decoration: underline;
}

/* ===== LANGUAGE SWITCHER ===== */
.lang-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(34, 34, 34, 0.9);
    color: var(--gold);
    border: 1px solid var(--border);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.lang-switch:hover {
    background: var(--gold);
    color: #000;
}

/* ===== STATUS TAGS ===== */
.w3-tag.active,
.w3-tag.success {
    background-color: var(--gold) !important;
    color: #000 !important;
}

.w3-tag.inactive,
.w3-tag.neutral {
    background-color: var(--neutral) !important;
    color: white !important;
}

.w3-tag.danger,
.w3-tag.delete {
    background-color: var(--danger) !important;
    color: white !important;
}

.w3-tag.warning {
    background-color: var(--yellow-warning) !important;
    color: #000 !important;
}

/* Trip status specific */
.trip-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 999;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.4);
}

.nav-item {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    transition: color 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-item.active,
.nav-item:hover {
    color: var(--gold);
    text-decoration: none;
}

.nav-item i {
    font-size: 1.6rem;
    display: block;
    margin-bottom: 4px;
}

/* ===== DASHBOARD SPECIFIC ===== */
.dashboard-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.3s ease;
    border-radius: 30px;
}

.tab-btn.active {
    background: var(--gold);
    color: #000;
}

.tab-btn:hover:not(.active) {
    color: var(--gold);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Trip Cards */
.trip-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.trip-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.trip-header {
    padding: 16px 20px;
    background: rgba(212, 175, 55, 0.1);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.trip-body {
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.trip-route {
    flex: 2;
    min-width: 200px;
}

.trip-vehicle {
    flex: 1;
    min-width: 180px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 12px;
}

.trip-driver {
    flex: 1;
    min-width: 180px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 12px;
}

.trip-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(0, 0, 0, 0.2);
}

.trip-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--gold);
}

.trip-id {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Route Points */
.route-point {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: flex-start;
}

.route-icon {
    width: 24px;
    text-align: center;
}

.route-icon i {
    font-size: 16px;
}

.route-icon.pickup i {
    color: #4caf50;
}

.route-icon.dropoff i {
    color: #f44336;
}

.route-address {
    flex: 1;
    font-size: 0.85rem;
    line-height: 1.4;
}

.route-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Vehicle & Driver Info */
.vehicle-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #1a1a1a;
}

.vehicle-details {
    font-size: 0.8rem;
}

.vehicle-details p {
    margin: 6px 0;
}

.driver-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

.driver-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.driver-contact {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--surface);
    border-radius: 24px;
    border: 2px dashed var(--border);
}

.empty-state i {
    font-size: 60px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    margin-bottom: 8px;
}

/* Mini Map */
.mini-map {
    height: 150px;
    border-radius: 12px;
    margin-top: 12px;
    background: #1a1a1a;
}

/* ===== BOOKING PAGE SPECIFIC ===== */
/* Icon Selector */
.icon-selector {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    flex: 1;
    min-width: 70px;
}

.icon-option:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
    background: rgba(212, 175, 55, 0.1);
}

.icon-option.active {
    background: var(--gold);
    border-color: var(--gold);
    color: #000;
}

.icon-option i {
    font-size: 20px;
    margin-bottom: 4px;
}

.icon-option span {
    font-size: 11px;
}

/* Flight Info */
.flight-info {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 12px;
    margin-top: 12px;
    font-size: 12px;
}

/* Compact Row Layout */
.compact-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.compact-row > * {
    flex: 1;
    min-width: 140px;
}

/* Route Map */
#route-map {
    width: 100%;
    height: 280px;
    border-radius: 16px;
    overflow: hidden;
    margin-top: 16px;
}

/* Favorite Address Dropdown */
.fav-dropdown {
    background: rgba(0, 0, 0, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.fav-dropdown .fav-item {
    cursor: pointer;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-light);
    transition: background 0.2s ease;
}

.fav-dropdown .fav-item:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Luggage Dropdown */
#luggage-dropdown {
    display: none;
    position: absolute;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 15px;
    min-width: 220px;
    z-index: 1000;
    margin-top: 5px;
}

/* Directions Panel */
#directions-panel {
    background: rgba(0, 0, 0, 0.5);
    margin-top: 16px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 11px;
    border-radius: 12px;
}

/* Vehicle Restriction Message */
#vehicle-restriction-message {
    background: rgba(255, 0, 0, 0.2);
    padding: 10px;
    margin-top: 16px;
    border-radius: 12px;
}

#restriction-text {
    color: #ff6b6b;
    font-size: 12px;
}

/* ===== MODALS ===== */
.w3-modal-content {
    background: rgba(0, 0, 0, 0.95);
    border-radius: 16px;
}

/* ===== DIVIDERS ===== */
.or-divider {
    margin: 28px 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    position: relative;
    text-align: center;
}

.or-divider::before,
.or-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: var(--border);
}

.or-divider::before {
    left: 0;
}

.or-divider::after {
    right: 0;
}

/* ===== TERMS SECTION ===== */
.terms {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
}

.terms a {
    color: var(--gold);
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

/* ===== LOADERS ===== */
.fb-loader {
    display: none;
    text-align: center;
    margin-top: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.fb-loader i {
    margin-right: 8px;
}

/* Password strength indicator */
#password-strength {
    font-size: 0.7rem;
    margin-top: 5px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .customer-main {
        padding: 20px 16px 100px !important;
    }
    
    .trip-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .trip-body {
        flex-direction: column;
    }
    
    .trip-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .compact-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .compact-row > * {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .login-box, .register-box {
        padding: 32px 20px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .logo-img {
        max-width: 150px;
    }
}

@media (max-width: 520px) {
    .register-box {
        padding: 32px 24px;
    }
    
    .name-row {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .w3-row.w3-padding {
        flex-direction: column;
    }
    
    .w3-col.s4.w3-center,
    .w3-col.s8.w3-padding-left {
        width: 100% !important;
        text-align: center;
    }
    
    .cancel-trip-btn, 
    .w3-button.w3-gold {
        width: 100% !important;
        margin: 8px 0 !important;
    }
    
    #save-pickup-fav, 
    #save-dropoff-fav {
        padding: 4px 8px !important;
        font-size: 0.85em !important;
    }
}

/* ===== PLACE AUTOCOMPLETE (Google Maps) ===== */
gmp-place-autocomplete {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-light);
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 14px;
}

gmp-place-autocomplete:focus {
    border-color: var(--gold);
    outline: none;
}

/* ===== TABLE STYLES ===== */
.w3-table {
    border: 1px solid var(--border);
}

.w3-table th {
    background: #2a2a2a;
}

.w3-table td, 
.w3-table th {
    padding: 12px;
    border-bottom: 1px solid var(--border);
}

/* ===== UTILITY CLASSES ===== */
.w3-text-gold {
    color: var(--gold) !important;
}

.w3-border-gold {
    border-color: var(--gold) !important;
}

.w3-text-gray {
    color: var(--text-muted) !important;
}

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

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.trip-card {
    animation: fadeIn 0.3s ease;
}
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification {
    animation: slideIn 0.3s ease;
}