/* ============================================================
   Vehicle Booking Widget — Scoped CSS
   All rules are prefixed with .booking-wrapper to prevent
   theme style conflicts.
   ============================================================ */

.booking-wrapper {
    all: revert;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #414042;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 16px;
}

.booking-wrapper * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.booking-wrapper .booking-container {
    width: 100%;
    max-width: 960px;
}

/* Custom Thin Scrollbars */
.booking-wrapper ::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.booking-wrapper ::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.booking-wrapper ::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.booking-wrapper ::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Hide Native Browser Date/Time Icons & Pickers */
.booking-wrapper input::-webkit-calendar-picker-indicator,
.booking-wrapper input::-webkit-inner-spin-button,
.booking-wrapper input::-webkit-clear-button {
    display: none !important;
    -webkit-appearance: none !important;
}

.booking-wrapper input[type="date"],
.booking-wrapper input[type="time"],
.booking-wrapper input[type="datetime-local"] {
    -moz-appearance: textfield;
}

/* Navigation Tabs */
.booking-wrapper .tab-bar {
    display: flex;
    gap: 8px;
    position: relative;
    z-index: 2;
    margin-bottom: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
}

.booking-wrapper .tab-btn {
    background-color: #163561;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0.95;
}

.booking-wrapper .tab-btn:hover {
    opacity: 1;
    background-color: #163561;
}

.booking-wrapper .tab-btn.active {
    background-color: #fbb040;
    color: #414042;
    opacity: 1;
}

/* Main Card Container */
.booking-wrapper .booking-card {
    background-color: #ffffff;
    border-radius: 3px;
    padding: 24px;
    box-shadow: 0 15px 30px rgba(22, 53, 97, 0.12);
    position: relative;
    border: 1px solid rgba(22, 53, 97, 0.08);
}

.booking-wrapper .tab-viewport {
    width: 100%;
    overflow-x: clip !important;
    overflow-y: visible;
}

.booking-wrapper .tab-panel-container {
    display: flex;
    width: 300%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.booking-wrapper .tab-panel {
    width: 33.333333%;
    flex-shrink: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.booking-wrapper .tab-panel.active {
    opacity: 1;
    pointer-events: auto;
}

/* Vehicle Section Layout */
.booking-wrapper .vehicle-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    padding: 12px;
    margin-bottom: 20px;
    background-color: #ffffff;
}

.booking-wrapper .vehicle-carousel-container {
    flex: 1;
    min-width: 0;
}

.booking-wrapper .vehicle-carousel-title {
    font-size: 11px;
    font-weight: 700;
    color: #414042;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-wrapper .vehicle-grid {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 6px;
}

/* Vehicle Item Cards */
.booking-wrapper .vehicle-item {
    border-radius: 3px;
    padding: 5px;
    text-align: center;
    min-width: 82px;
    cursor: pointer;
    background: #f8fafc;
    transition: all 0.2s ease;
    user-select: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
}

.booking-wrapper .vehicle-item:hover {
    border-color: #163561;
    background-color: #f1f5f9;
}

.booking-wrapper .vehicle-item.selected {
    border-color: #a0bce3;
    background: linear-gradient(135deg, #a0bce3, #3e526e) !important;
}

.booking-wrapper .vehicle-item span {
    font-size: 13px;
    font-weight: 700;
    color: #414042;
    margin-bottom: 6px;
    order: 1;
}

.booking-wrapper .vehicle-item.selected span {
    color: white;
}

.booking-wrapper .vehicle-item img {
    width: 65px;
    height: auto;
    display: block;
    order: 2;
}

/* Right Side Vehicle Details */
.booking-wrapper .vehicle-info-container {
    width: 340px;
    flex-shrink: 0;
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    padding: 12px;
    background-color: #f8fafc;
}

.booking-wrapper .vehicle-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.booking-wrapper .vehicle-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.booking-wrapper .vehicle-title {
    font-size: 13px;
    font-weight: 800;
    color: #163561;
    text-transform: uppercase;
}

.booking-wrapper .btn-view-popup {
    color: #163561;
    font-size: 11px;
    text-decoration: underline;
    font-weight: 700;
    cursor: pointer;
    background: none;
    border: none;
}

/* Price Display & Popover */
.booking-wrapper .price-display {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background-color: #d0d4db;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    line-height: normal;
}

.booking-wrapper .price-label {
    font-size: 10px;
    font-weight: 600;
    color: #414042;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.booking-wrapper .price-amount {
    font-size: 13px;
    font-weight: 800;
    color: #163561;
}

.booking-wrapper .price-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #163561;
    cursor: pointer;
}

.booking-wrapper .price-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 270px;
    background-color: #163561;
    color: #ffffff;
    padding: 10px 12px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.4;
    font-weight: 400;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 100000;
    text-align: left;
}

.booking-wrapper .price-popover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    right: 12px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #163561 transparent;
}

.booking-wrapper .price-display:hover .price-popover,
.booking-wrapper .price-popover-trigger:hover .price-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.booking-wrapper .feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 12px;
    list-style: none;
    font-size: 12px;
    color: #414042;
    line-height: normal;
}

.booking-wrapper .feature-grid li {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Modal Popup */
.booking-wrapper .vehicle-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(22, 53, 97, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.booking-wrapper .vehicle-modal.active {
    opacity: 1;
    visibility: visible;
}

.booking-wrapper .modal-content {
    background: #ffffff;
    border-radius: 3px;
    padding: 20px;
    max-width: 520px;
    max-height: 90vh;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.booking-wrapper .modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #f1f5f9;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #414042;
    cursor: pointer;
    z-index: 10;
}

.booking-wrapper .gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 10px;
}

.booking-wrapper .main-car-img {
    width: 100%;
    max-height: 380px;
    object-fit: contain;
    border-radius: 3px;
}

/* Form & Fields Layout */
.booking-wrapper .booking-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.booking-wrapper .form-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1fr;
    gap: 10px;
    align-items: center;
}

.booking-wrapper .location-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #163561;
    font-size: 14px;
    user-select: none;
    padding: 0 2px;
}

.booking-wrapper .input-group {
    position: relative;
    width: 100%;
}

.booking-wrapper .input-group input {
    width: 100%;
    padding: 12px 38px 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    font-size: 13px;
    outline: none;
    color: #414042;
    background-color: #ffffff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    font-family: inherit;
}

.booking-wrapper .input-group input:focus {
    border-color: #163561;
    box-shadow: 0 0 0 3px rgba(22, 53, 97, 0.12);
}

.booking-wrapper .input-group input[readonly] {
    background-color: #f8fafc;
    color: #414042;
    cursor: pointer;
}

.booking-wrapper .input-group .field-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #163561;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-wrapper .flatpickr-calendar {
    box-shadow: 0 10px 25px rgba(22, 53, 97, 0.2) !important;
    border-radius: 3px !important;
    border: 1px solid #cbd5e1 !important;
}

.booking-wrapper .flatpickr-day.selected {
    background: #163561 !important;
    border-color: #163561 !important;
}

/* Readonly Popover */
.booking-wrapper .readonly-popover {
    position: absolute;
    top: calc(100% - 2px);
    left: 0;
    background-color: #163561;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-2px);
    transition: all 0.2s ease;
    z-index: 100000;
}

.booking-wrapper .readonly-popover::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 16px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #163561 transparent;
}

.booking-wrapper .input-group:hover .readonly-popover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Autocomplete Dropdown */
.booking-wrapper .autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: calc(100% - 25px);
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    box-shadow: 0 16px 32px rgba(22, 53, 97, 0.15);
    display: none;
    z-index: 99999;
    overflow: hidden;
    padding: 0;
}

.booking-wrapper .autocomplete-dropdown.show {
    display: block;
}

.booking-wrapper .current-location-popover {
    background-color: #163561;
    color: #ffffff;
    padding: 11px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.booking-wrapper .current-location-popover:hover {
    background-color: #163561;
}

.booking-wrapper .suggestions-list {
    background-color: #ffffff;
    max-height: 200px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.booking-wrapper .autocomplete-item {
    padding: 10px 14px;
    font-size: 12px;
    color: #414042;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.4;
    transition: background-color 0.15s ease;
    white-space: nowrap;
}

.booking-wrapper .autocomplete-item:last-child {
    border-bottom: none;
}

.booking-wrapper .autocomplete-item:hover {
    background-color: #f8fafc;
    color: #163561;
}

.booking-wrapper .autocomplete-item .icon {
    color: #163561;
    margin-top: 1px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.booking-wrapper .autocomplete-item .text-container {
    display: flex;
    flex-direction: column;
}

.booking-wrapper .autocomplete-item .main-text {
    font-weight: 600;
    color: #414042;
}

.booking-wrapper .autocomplete-item .sub-text {
    font-size: 10px;
    color: #64748b;
}

.booking-wrapper .form-action-row {
    display: flex;
    justify-content: flex-end;
}

.booking-wrapper .btn-book {
    background-color: #fbb040;
    color: #414042;
    border: none;
    height: 42px;
    padding: 0 32px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    width: auto;
    font-family: inherit;
}

.booking-wrapper .btn-book:hover {
    background-color: #f3a427;
}

/* Step 2: Passenger Details */
.booking-wrapper .step2-view {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.booking-wrapper .step2-view.active {
    display: flex;
}

.booking-wrapper .step2-top-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.booking-wrapper .summary-card {
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    padding: 16px 20px;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
}

.booking-wrapper .summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.booking-wrapper .summary-vehicle-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.booking-wrapper .summary-vehicle-info img {
    width: 60px;
    height: auto;
}

.booking-wrapper .summary-vehicle-info .v-title {
    font-size: 16px;
    font-weight: 800;
    color: #163561;
}

.booking-wrapper .summary-vehicle-info .v-sub {
    font-size: 12px;
    color: #414042;
}

.booking-wrapper .summary-price {
    font-size: 16px;
    font-weight: 800;
    color: #163561;
    display: flex;
    align-items: center;
    gap: 6px;
}

.booking-wrapper .price-popover-trigger {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.booking-wrapper .summary-route {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #414042;
    background-color: #f8fafc;
    padding: 10px 14px;
    border-radius: 3px;
    gap: 8px;
}

.booking-wrapper .summary-route .route-item {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.booking-wrapper .summary-route .route-label {
    font-size: 10px;
    color: #64748b;
    margin-bottom: 2px;
}

.booking-wrapper .summary-route .route-value {
    font-weight: 600;
    color: #163561;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Name Board Box */
.booking-wrapper .board-card {
    border: 1px solid #e2e8f0;
    border-radius: 3px;
    padding: 16px;
    background-color: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.booking-wrapper .toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #414042;
}

/* Toggle Switch */
.booking-wrapper .switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
}

.booking-wrapper .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.booking-wrapper .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 20px;
}

.booking-wrapper .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.booking-wrapper input:checked+.slider {
    background-color: #163561;
}

.booking-wrapper input:checked+.slider:before {
    transform: translateX(18px);
}

.booking-wrapper .step2-inputs-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.booking-wrapper .step2-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    font-size: 13px;
    outline: none;
    background-color: #ffffff;
    color: #414042;
    font-family: inherit;
}

.booking-wrapper .step2-input:focus {
    border-color: #163561;
    box-shadow: 0 0 0 2px rgba(22, 53, 97, 0.12);
}

.booking-wrapper .highlight-yellow {
    border: 2px solid #fbb040 !important;
}

/* Passenger Details Row */
.booking-wrapper .passenger-details-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 12px;
}

.booking-wrapper .phone-input-group {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    padding: 0 10px;
    background-color: #ffffff;
}

.booking-wrapper .phone-input-group:focus-within {
    border-color: #163561;
    box-shadow: 0 0 0 2px rgba(22, 53, 97, 0.12);
}

.booking-wrapper .flag-dropdown {
    display: flex;
    align-items: center;
    gap: 4px;
    padding-right: 8px;
    border-right: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #414042;
    cursor: pointer;
    flex-shrink: 0;
    user-select: none;
}

.booking-wrapper .flag-dropdown img {
    width: 20px;
    height: 14px;
    border-radius: 3px;
    object-fit: cover;
}

.booking-wrapper .country-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 260px;
    max-height: 220px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    box-shadow: 0 10px 25px rgba(22, 53, 97, 0.15);
    z-index: 100000;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.booking-wrapper .country-dropdown-menu.show {
    display: flex;
}

.booking-wrapper .country-search-box {
    padding: 8px;
    border-bottom: 1px solid #e2e8f0;
    background-color: #f8fafc;
}

.booking-wrapper .country-search-box input {
    width: 100%;
    padding: 6px 10px;
    font-size: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    outline: none;
    color: #414042;
    font-family: inherit;
}

.booking-wrapper .country-search-box input:focus {
    border-color: #163561;
}

.booking-wrapper .country-list {
    overflow-y: auto;
    max-height: 160px;
}

.booking-wrapper .country-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    font-size: 12px;
    color: #414042;
    cursor: pointer;
    transition: background 0.15s ease;
}

.booking-wrapper .country-item:hover {
    background-color: #f1f5f9;
    color: #163561;
}

.booking-wrapper .country-item img {
    width: 18px;
    height: 12px;
    object-fit: cover;
    border-radius: 2px;
}

.booking-wrapper .country-item .c-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.booking-wrapper .country-item .c-code {
    font-weight: 600;
    color: #64748b;
}

.booking-wrapper .phone-input-group input[type="tel"] {
    border: none;
    outline: none;
    padding: 10px 8px;
    width: 100%;
    font-size: 13px;
    color: #414042;
    font-family: inherit;
}

/* Bottom Buttons */
.booking-wrapper .step2-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.booking-wrapper .btn-back {
    background-color: #ffffff;
    color: #414042;
    border: 1px solid #cbd5e1;
    height: 40px;
    padding: 0 24px;
    border-radius: 3px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.booking-wrapper .btn-back:hover {
    background-color: #f8fafc;
    border-color: #163561;
}

.booking-wrapper .btn-next {
    background-color: #fbb040;
    color: #414042;
    border: none;
    height: 40px;
    padding: 0 28px;
    border-radius: 3px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: inherit;
}

.booking-wrapper .btn-next:hover {
    background-color: #f3a427;
}

/* Responsive */
@media (max-width: 840px) {
    .booking-wrapper .vehicle-section {
        flex-direction: column;
        align-items: stretch;
    }

    .booking-wrapper .vehicle-info-container {
        width: 100%;
    }

    .booking-wrapper .form-row {
        grid-template-columns: 1fr;
    }

    .booking-wrapper .location-arrow {
        transform: rotate(90deg);
        padding: 4px 0;
    }

    .booking-wrapper .passenger-details-row {
        grid-template-columns: 1fr 1fr;
    }

    .booking-wrapper .step2-top-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .booking-wrapper .booking-card {
        padding: 16px;
    }

    .booking-wrapper .passenger-details-row {
        grid-template-columns: 1fr;
    }

    .booking-wrapper .step2-inputs-row {
        grid-template-columns: 1fr;
    }

    .booking-wrapper .btn-book {
        width: 100%;
    }

    .booking-wrapper .step2-actions {
        flex-direction: column-reverse;
    }

    .booking-wrapper .btn-back,
    .booking-wrapper .btn-next {
        width: 100%;
    }
}