/* ===================================================
   BAC TAI VN - STYLESHEET
   Dịch vụ đặt xe trực tuyến & tính giá tự động
   =================================================== */

:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #f59e0b;
    --accent-hover: #d97706;
    --danger: #dc2626;
    --success: #16a34a;
    --dark: #0f172a;
    --light-bg: #f8fafc;
    --border-color: #e2e8f0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1e293b;
    background-color: #ffffff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, .brand-title {
    font-family: 'Montserrat', sans-serif;
}

.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-15 { font-size: 15px; }
.fw-black { font-weight: 900; }

/* Brand Logo Image */
.brand-logo-img {
    height: 48px;
    max-height: 48px;
    width: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}
.brand-logo-img:hover {
    transform: scale(1.02);
}
@media (max-width: 576px) {
    .brand-logo-img {
        height: 38px;
        max-height: 38px;
    }
}

/* Brand Badge */
.brand-badge {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
}

.brand-title {
    font-size: 22px;
    letter-spacing: -0.5px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    padding: 40px 0 60px;
    color: #ffffff;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

/* Booking Card Box */
.booking-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    color: #1e293b;
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.booking-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    padding: 18px 24px;
    color: #ffffff;
}

/* Trip Type Switch */
.trip-switch {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px;
    border-radius: 30px;
    display: inline-flex;
}

.trip-switch-btn {
    border: none;
    background: transparent;
    color: #ffffff;
    padding: 6px 18px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
}

.trip-switch-btn.active {
    background: #ffffff;
    color: #1e3a8a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Autocomplete Input Container */
.input-location-group {
    position: relative;
}

.location-icon-badge {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 5;
}

.form-control-location {
    padding-left: 45px;
    padding-right: 40px;
    height: 52px;
    font-size: 15px;
    font-weight: 500;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.form-control-location:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.btn-clear-input {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    z-index: 5;
    padding: 0;
    width: 32px;
    height: 32px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.btn-clear-input:hover, .btn-clear-input:focus {
    color: #dc2626;
    background-color: #fee2e2;
}

.btn-clear-input.active {
    display: flex !important;
}

/* Swap Locations Button */
.btn-swap-location {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #ffffff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: -10px auto;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-swap-location:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    transform: rotate(180deg);
}

/* Suggestions Dropdown */
.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    z-index: 100;
    max-height: 280px;
    overflow-y: auto;
    display: none;
    margin-top: 6px;
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background 0.15s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover, .suggestion-item.active {
    background: #eff6ff;
}

.suggestion-icon {
    margin-top: 3px;
    color: #3b82f6;
    font-size: 15px;
}

.suggestion-name {
    font-weight: 600;
    font-size: 14px;
    color: #0f172a;
}

.suggestion-address {
    font-size: 12px;
    color: #64748b;
    margin-top: 2px;
}

/* Quick destination tags */
.quick-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    margin: 3px 2px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.15s ease;
}

.quick-tag:hover {
    background: #dbeafe;
    color: #1e40af;
    border-color: #93c5fd;
}

/* Car Option Card (Radio Selection) */
.car-select-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.car-select-item {
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #ffffff;
    position: relative;
}

.car-select-item:hover {
    border-color: #93c5fd;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
}

.car-select-item.active {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.15);
}

.car-select-item .car-img {
    height: 52px;
    object-fit: contain;
    margin-bottom: 6px;
    transition: transform 0.2s ease;
}

.car-select-item:hover .car-img {
    transform: scale(1.05);
}

.car-select-item .car-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}

.car-select-item .car-seats {
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
}

.car-select-item .car-price {
    font-size: 13px;
    font-weight: 800;
    color: #dc2626;
}

/* Route Summary Info Box */
.route-info-box {
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: 14px;
    padding: 14px 18px;
}

/* Map Container */
#mapContainer {
    width: 100%;
    height: 380px;
    min-height: 350px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    border: 2px solid #e2e8f0;
    z-index: 1;
    position: relative;
    background-color: #f1f5f9;
}

/* Fix Leaflet tiles in Bootstrap container */
.leaflet-container {
    width: 100% !important;
    height: 100% !important;
    background: #f1f5f9 !important;
}

.leaflet-tile-container img {
    max-width: none !important;
    max-height: none !important;
}

/* Floating contact buttons */
.floating-contact {
    position: fixed;
    right: 20px;
    bottom: 25px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

.float-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px 6px 8px;
    border-radius: 40px;
    text-decoration: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}

.float-btn:hover {
    transform: translateY(-3px) scale(1.02);
}

.float-zalo {
    background: #0068ff;
    color: #ffffff;
}

.float-phone {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff;
    position: relative;
}

.float-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 40px;
    border: 3px solid #ef4444;
    animation: pulseRing 1.6s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
    pointer-events: none;
}

@keyframes pulseRing {
    0% { transform: scale(0.95); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 0.3; }
    100% { transform: scale(1.25); opacity: 0; }
}

.float-btn .float-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.float-top {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: #1e293b;
    color: #ffffff;
    justify-content: center;
    display: none;
}

/* Feature Badge */
.feature-box {
    border-radius: 16px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    height: 100%;
}

.feature-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e1;
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 16px;
}

/* Route Table */
.route-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px 20px;
    background: #ffffff;
    transition: all 0.2s ease;
}

.route-card:hover {
    border-color: #2563eb;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.08);
}

/* Pulse animation for call button in header */
.call-pulse {
    width: 32px;
    height: 32px;
    background: #dc2626;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    animation: shake 1.5s infinite;
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    20%, 60% { transform: rotate(-15deg); }
    40%, 80% { transform: rotate(15deg); }
}

@media (max-width: 768px) {
    .topbar-section {
        padding-top: 4px !important;
        padding-bottom: 4px !important;
    }
    .main-header .navbar {
        padding-top: 6px !important;
        padding-bottom: 6px !important;
    }
    .brand-badge {
        width: 36px;
        height: 36px;
    }
    .brand-badge i {
        font-size: 17px !important;
    }
    .brand-title {
        font-size: 18px !important;
    }
    .hero-section {
        padding: 20px 0 35px;
    }
    #mapContainer {
        height: 300px !important;
        min-height: 300px !important;
        display: block !important;
        margin-top: 10px;
    }
    .booking-card {
        border-radius: 16px;
    }
    .car-select-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
