/**
 * Copyright (c) 2026 Mizicart. All rights reserved.
 * Private and confidential source code. Unauthorized use prohibited.
 */

/* Section: Booking store ride-home widget (Booking store only).
   Booking is NOT a grocery store — strip brand header, theme chrome, search,
   shop-by-category. Keep: live ride card, minimal back, footer button bar. */

/* Neutral page — no purple grocery-style store theme */
body.store-shell-booking,
body.store-shell-booking #main-app-container,
body.store-shell-booking #category-store-page,
body.store-shell-booking .cat-store-shell,
body.store-shell-booking.store-page-booking .cat-store-shell,
.store-page-booking .cat-store-shell {
    background: #f5f6f8 !important;
    --bg-color: #f5f6f8;
    --surface-color: #ffffff;
    --cat-store-page-bg: #f5f6f8;
    --cat-store-accent: #1565c0;
}

/* Hide Mizicart brand / store title / tagline — floating back over full-bleed map */
body.store-shell-booking .cat-store-shell {
    position: relative;
}
body.store-shell-booking .cat-store-header,
.store-shell-booking .cat-store-header {
    position: absolute !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 6;
    pointer-events: none;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    color: #1565c0;
}
body.store-shell-booking .cat-store-header::before,
body.store-shell-booking .cat-store-header::after,
.store-shell-booking .cat-store-header::before,
.store-shell-booking .cat-store-header::after {
    display: none !important;
    content: none !important;
}
body.store-shell-booking .cat-store-brand,
body.store-shell-booking #grocery-store-title-stack,
body.store-shell-booking .cat-store-icon,
body.store-shell-booking .cat-store-brand-text,
body.store-shell-booking .cat-store-name,
body.store-shell-booking .cat-store-tagline,
body.store-shell-booking .grocery-store-carry-bag,
body.store-shell-booking .grocery-store-title-brand,
body.store-shell-booking .grocery-store-title-main,
body.store-shell-booking .grocery-store-title-sub,
body.store-shell-booking .grocery-store-pickup-vehicles {
    display: none !important;
}
body.store-shell-booking .cat-store-back {
    pointer-events: auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff !important;
    color: #1565c0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

/* Strip grocery chrome under the store — only the live ride card stays on Home */
body.store-shell-booking .grocery-store-premium-divider,
body.store-shell-booking .grocery-store-delivery-meta,
body.store-shell-booking .grocery-store-search-bar,
body.store-shell-booking #grocery-store-search-results,
body.store-shell-booking #cat-store-grocery-home,
body.store-shell-booking #cat-store-home-landing,
body.store-shell-booking #cat-store-tab-category,
body.store-shell-booking #cat-store-tab-checkout,
body.store-shell-booking #grocery-store-category-panel,
body.store-shell-booking #cat-store-browse-wrap {
    display: none !important;
}

body.store-shell-booking #grocery-store-search-wrap {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent;
}

/* Status tab: hide live card / search — show status page only */
body.store-shell-booking.booking-status-view #grocery-store-search-wrap,
body.store-shell-booking.booking-status-view #booking-store-ride-home {
    display: none !important;
}
body.store-shell-booking.booking-status-view #cat-store-tab-reorder {
    display: block !important;
    padding: 12px 14px 80px;
}
body.store-shell-booking .booking-status-panel .booking-status-section {
    margin: 0 0 18px;
}
body.store-shell-booking .booking-status-panel .booking-status-section-title {
    margin: 0 0 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
}
body.store-shell-booking .booking-status-panel .cat-store-reorder-empty {
    margin: 0 0 12px;
    font-size: 0.9rem;
    color: #666;
}
body.store-shell-booking .booking-track-timeline {
    list-style: none;
    margin: 12px 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
body.store-shell-booking .booking-track-step {
    font-size: 0.78rem;
    padding: 4px 8px;
    border-radius: 6px;
    background: #f0f0f0;
    color: #666;
}
body.store-shell-booking .booking-track-step.is-done,
body.store-shell-booking .booking-track-step.is-active {
    background: #e8f5e9;
    color: #1b5e20;
    font-weight: 600;
}
body.store-shell-booking .booking-track-map-wrap {
    position: relative;
    margin: 10px 0 14px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
    aspect-ratio: 16 / 10;
    background: #f7f7f7;
}
body.store-shell-booking .booking-track-map {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    pointer-events: auto;
}
/* Keep embed "View larger map"; hide Track-on-Maps overlays / extra links. */
body.store-shell-booking .booking-track-map-tap,
body.store-shell-booking .booking-track-maps-link,
body.store-shell-booking .booking-track-maps-link--block,
body.store-shell-booking .booking-track-eta-only-note,
body.store-shell-booking .order-completion-otp-hint,
body.store-shell-booking .transport-booking-otp-card .order-completion-otp-hint {
    display: none !important;
}
body.store-shell-booking .cat-store-reorder-track-btn {
    margin-left: 8px;
    padding: 4px 10px;
    font-size: 0.8rem;
}

/* Minimal Status → Track card */
body.store-shell-booking .booking-track-minimal {
    padding: 4px 0 12px;
}
body.store-shell-booking .booking-track-vehicle-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}
body.store-shell-booking .booking-track-vehicle-img {
    width: 120px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    background: #f3f3f3;
    flex-shrink: 0;
}
body.store-shell-booking .booking-track-vehicle-img--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}
body.store-shell-booking .booking-track-plate {
    margin: 0 0 2px;
    font-size: 1.05rem;
}
body.store-shell-booking .booking-track-vehicle-name {
    margin: 0 0 4px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1565c0;
}
body.store-shell-booking .booking-track-driver,
body.store-shell-booking .booking-track-eta {
    margin: 0 0 2px;
    font-size: 0.92rem;
    color: #333;
}
body.store-shell-booking .booking-track-ride-status {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.35;
    color: #222;
}
body.store-shell-booking .booking-track-ride-status span {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #777;
    margin-bottom: 2px;
}
body.store-shell-booking .booking-track-status--cancel,
body.store-shell-booking .cat-store-reorder-status--cancel {
    color: #c62828 !important;
    font-weight: 800;
}
body.store-shell-booking .booking-track-status--novendor {
    color: #e65100 !important;
    font-weight: 800;
}
body.store-shell-booking .transport-booking-success--no-partner .booking-flow-hint {
    color: #e65100;
    font-weight: 600;
}
body.store-shell-booking .cat-store-reorder-status--cancel {
    background: #ffebee;
    padding: 2px 8px;
    border-radius: 999px;
}
body.store-shell-booking .booking-track-eta {
    font-weight: 600;
    color: #1b5e20;
}
body.store-shell-booking .booking-track-addr,
body.store-shell-booking .booking-track-amount,
body.store-shell-booking .booking-track-pay,
body.store-shell-booking .booking-track-pay-status {
    margin: 0 0 8px;
    font-size: 0.92rem;
    line-height: 1.35;
    color: #222;
}
body.store-shell-booking .booking-track-addr span,
body.store-shell-booking .booking-track-amount span,
body.store-shell-booking .booking-track-pay span,
body.store-shell-booking .booking-track-pay-status span {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #777;
    margin-bottom: 2px;
}
body.store-shell-booking .booking-track-pay-status strong {
    color: #1b5e20;
}
body.store-shell-booking .booking-track-addr-link {
    color: #1565c0;
    font-weight: 600;
    text-decoration: none;
}
body.store-shell-booking .booking-track-addr-link:active {
    opacity: 0.85;
}
body.store-shell-booking .booking-track-eta-only-note {
    margin: 10px 0 12px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.88rem;
    line-height: 1.35;
}
body.store-shell-booking .booking-track-actions {
    display: none;
}
.booking-track-btn-grid,
body.store-shell-booking .booking-track-btn-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
}
.booking-track-btn-grid--no-comms {
    grid-template-columns: 1fr 1fr;
}
.booking-track-grid-btn,
body.store-shell-booking .booking-track-grid-btn {
    box-sizing: border-box;
    width: 100%;
    min-height: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    text-align: center;
}
.booking-track-grid-btn--spacer {
    visibility: hidden;
    pointer-events: none;
    border: 0;
    background: transparent;
}
/* Force track action colors (override booking.css / product-actions.css). */
body.store-shell-booking .booking-track-btn-grid .booking-track-call-btn.booking-track-grid-btn,
.booking-track-btn-grid .booking-track-call-btn.booking-track-grid-btn {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
    color: #c62828 !important;
}
body.store-shell-booking .booking-track-btn-grid .booking-track-chat-btn.booking-track-grid-btn,
.booking-track-btn-grid .booking-track-chat-btn.booking-track-grid-btn {
    background: #2e7d32 !important;
    border-color: #2e7d32 !important;
    color: #ffffff !important;
}
body.store-shell-booking .booking-track-btn-grid .booking-track-back-btn.booking-track-grid-btn,
.booking-track-btn-grid .booking-track-back-btn.booking-track-grid-btn {
    background: #1565c0 !important;
    border-color: #1565c0 !important;
    color: #ffffff !important;
}
body.store-shell-booking .booking-track-btn-grid .booking-track-cancel-btn.booking-track-grid-btn,
.booking-track-btn-grid .booking-track-cancel-btn.booking-track-grid-btn,
body.store-shell-booking .booking-track-cancel-btn {
    background: #c62828 !important;
    border-color: #c62828 !important;
    color: #ffffff !important;
}
body.store-shell-booking .booking-track-btn-grid .booking-track-cancel-btn.booking-track-grid-btn:active,
.booking-track-btn-grid .booking-track-cancel-btn.booking-track-grid-btn:active {
    background: #b71c1c !important;
    border-color: #b71c1c !important;
}
body.store-shell-booking .booking-track-comms-hint,
.booking-track-comms-hint {
    display: none !important;
}
.booking-track-grid-btn.is-disabled,
.booking-track-grid-btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}
.booking-track-comms,
body.store-shell-booking .booking-track-comms,
.transport-booking-success .booking-track-comms {
    margin: 12px 0 8px;
}
.booking-track-comms-hint {
    margin: 6px 0 0;
}
.booking-track-comms-actions .is-disabled,
.booking-track-comms-actions [disabled] {
    opacity: 0.55;
    cursor: not-allowed;
}
.booking-track-chat,
body.store-shell-booking .booking-track-chat {
    margin-top: 10px;
    padding: 10px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}
.booking-track-chat-list,
body.store-shell-booking .booking-track-chat-list {
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}
.booking-track-chat-empty,
body.store-shell-booking .booking-track-chat-empty {
    margin: 0;
    font-size: 0.85rem;
    color: #64748b;
}
.booking-track-chat-msg,
body.store-shell-booking .booking-track-chat-msg {
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    max-width: 92%;
}
.booking-track-chat-msg--user,
body.store-shell-booking .booking-track-chat-msg--user {
    align-self: flex-end;
    background: #ecfdf5;
    border-color: #bbf7d0;
}
.booking-track-chat-msg--partner,
body.store-shell-booking .booking-track-chat-msg--partner {
    align-self: flex-start;
}
.booking-track-chat-who,
body.store-shell-booking .booking-track-chat-who {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 2px;
}
.booking-track-chat-text,
body.store-shell-booking .booking-track-chat-text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.35;
    color: #0f172a;
    word-break: break-word;
}
.booking-track-chat-time,
body.store-shell-booking .booking-track-chat-time {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    color: #94a3b8;
    text-align: right;
}
.booking-track-chat-compose,
body.store-shell-booking .booking-track-chat-compose {
    display: flex;
    gap: 8px;
    align-items: center;
}
.booking-track-chat-input,
body.store-shell-booking .booking-track-chat-input {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
}
body.store-shell-booking .booking-status-detail-view .cat-store-reorder-title {
    display: none;
}

body.store-shell-booking #category-store-page,
body.store-shell-booking .cat-store-shell {
    padding: 0 !important;
    margin: 0 !important;
}

/* Booking footer — always visible above route page / location search / overlays */
body.store-shell-booking #store-footer-nav,
body.store-shell-booking #store-footer-nav.store-footer-booking-five {
    display: flex !important;
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 14000 !important;
    background: #ffffff !important;
}
body.store-shell-booking #booking-flow-overlay.open {
    /* Vehicle sheet sits above content but leaves the 5-tab footer visible */
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
}
body.store-shell-booking #location-panel.open {
    z-index: 13000 !important;
}
body.store-shell-booking #location-permission-modal.open {
    /* Dim overlay stops above footer so the 5-tab bar stays usable */
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
}

#booking-store-ride-home {
    display: none;
}
body.store-shell-booking #booking-store-ride-home {
    display: block !important;
}
#booking-store-ride-home[aria-hidden="true"] {
    display: none !important;
}

/*
 * Real ride-app home (Uber/Ola/Rapido style):
 * - Map = upper band only (~40% / less than half), edge-to-edge L/R
 * - White sheet = below the map (not floating over a full-page map)
 */
.booking-ride-home {
    position: relative;
    margin: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 58px);
    background: #fff;
}

/* Live map — less than half page, full width left/right */
.booking-ride-home-map-card {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
    height: min(38vh, 280px);
    min-height: 200px;
    max-height: 300px;
    background: #e8eef3;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    border: none;
}
.booking-ride-home-map-iframe {
    /* Crop Google chrome (top "Open in Maps" + bottom-right zoom) without blur overlays */
    position: absolute;
    left: -18%;
    top: -60px;
    width: 136%;
    height: calc(100% + 150px);
    border: 0;
    display: block;
    pointer-events: none;
}
/* Hide leftover Google "Open in Maps" chip (top-right of embed) */
.booking-ride-home-map-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 110px;
    height: 40px;
    background: #e8eef3;
    z-index: 1;
    pointer-events: none;
}
.booking-ride-home-map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    font-size: 13px;
    color: var(--text-muted, #667);
    background: #eef2f6;
}

/* Small custom location pin at map center (Google embed pin disabled) */
.booking-ride-home-pin {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 16px;
    height: 24px;
    margin: 0;
    transform: translate(-50%, -90%);
    z-index: 2;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}
.booking-ride-home-pin svg {
    display: block;
    width: 16px;
    height: 24px;
}

/* Current-location access — GPS SVG only, no white ring/button chrome */
.booking-ride-home-locate-btn {
    position: absolute;
    left: auto;
    right: 10px;
    bottom: 12px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #4169e1;
    pointer-events: auto;
}
.booking-ride-home-locate-btn:active {
    transform: scale(0.94);
}
.booking-ride-home-locate-btn svg {
    display: block;
    width: 24px;
    height: 24px;
    pointer-events: none;
}

/* Top-right corner — "me" button; Add ride expands in the same control */
.booking-ride-home-corner {
    position: absolute;
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    z-index: 3;
}
.booking-ride-home-forme-btn {
    border: none;
    background: #fff;
    color: #0d47a1;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    white-space: nowrap;
}
.booking-ride-home-forme-popover {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 168px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    padding: 6px;
    flex-direction: column;
    gap: 4px;
}
.booking-ride-home-forme-popover.open {
    display: flex;
}
.booking-ride-home-forme-option {
    border: none;
    background: #f3f4f6;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: #111;
}
.booking-ride-home-forme-option:hover {
    background: #e8eef5;
}

.booking-ride-home-addrider-form {
    display: none;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 4px 0 2px;
    background: transparent;
    border: none;
}
.booking-ride-home-addrider-form.open {
    display: flex;
}
.booking-ride-home-rider-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 7px 9px;
    font-size: 12px;
    background: #f9fafb;
}
.booking-ride-home-rider-save {
    border: none;
    background: #111;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* Sheet sits under the map — white panel with rounded top (real booking apps) */
.booking-ride-home-sheet {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: 4;
    flex: 1 1 auto;
    background: #fff;
    border-radius: 18px 18px 0 0;
    margin-top: -14px;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.1);
    padding: 2px 12px calc(72px + env(safe-area-inset-bottom, 0px));
    overflow: auto;
}
.booking-ride-home-sheet-handle {
    display: flex;
    justify-content: center;
    padding: 2px 0 6px;
}
.booking-ride-home-sheet-handle span {
    width: 36px;
    height: 4px;
    border-radius: 4px;
    background: #d1d5db;
}

/* Current-location row — very compact single line; opens separate route page */
.booking-ride-home-current-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin: 0;
    background: #f3f4f6;
    border: none;
    border-radius: 10px;
    box-shadow: none;
    padding: 6px 10px;
    min-height: 34px;
    max-height: 36px;
    height: 36px;
    text-align: left;
    cursor: pointer;
    position: relative;
    z-index: 3;
}

/* 6 service cards under location box — 2 rows × 3 */
.booking-ride-home-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 8px;
    padding-bottom: 4px;
}
.booking-ride-home-svc-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-height: 92px;
    padding: 6px 4px 6px;
    border: 1px solid #ffffff;
    border-radius: 14px;
    background: #ffffff;
    cursor: pointer;
    color: #334155;
    overflow: hidden;
    transition: background 0.15s ease, transform 0.12s ease;
}
.booking-ride-home-svc-card:active {
    transform: scale(0.97);
    background: #eef2f7;
    border-color: #ffffff;
}

/* Studio → Coming Soon: keep card visible with badge (do not remove from grid) */
.booking-ride-home-svc-card--coming-soon {
    position: relative;
    opacity: 0.92;
}
.booking-ride-home-svc-card--coming-soon .cat-coming-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    z-index: 2;
}
.booking-ride-home-svc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    width: 100%;
    min-height: 48px;
    padding: 0;
}
.booking-ride-home-svc-img {
    display: block;
    width: 100%;
    height: 48px;
    object-fit: contain;
    object-position: center;
    pointer-events: none;
    user-select: none;
    transform: scale(1);
}
.booking-ride-home-svc-label {
    flex: none;
    margin-top: auto;
    width: 100%;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    color: #1f2937;
    padding-top: 4px;
}

/* Tall advertisement cards under the 6 service cards */
.booking-ride-home-ads {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 4px 0 16px;
}
.booking-ride-home-ad-card {
    position: relative;
    min-height: 168px;
    padding: 22px 18px 20px;
    border-radius: 16px;
    border: 1px solid transparent;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    color: #0f172a;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.booking-ride-home-ad-card--has-img {
    min-height: 220px;
    padding: 0;
    color: #fff;
}
.booking-ride-home-ad-card--img-only {
    min-height: 240px;
    aspect-ratio: 16 / 9;
    background: #e8eef5;
}
.booking-ride-home-ad-card--img-only .booking-ride-home-ad-img {
    object-fit: cover;
    object-position: center center;
}
.booking-ride-home-ad-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    user-select: none;
}
.booking-ride-home-ad-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.booking-ride-home-ad-card--has-img .booking-ride-home-ad-copy {
    padding: 56px 16px 18px;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.55) 55%, rgba(15, 23, 42, 0.78) 100%);
}
.booking-ride-home-ad-card--has-img .booking-ride-home-ad-kicker,
.booking-ride-home-ad-card--has-img .booking-ride-home-ad-title,
.booking-ride-home-ad-card--has-img .booking-ride-home-ad-line {
    color: #fff;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.booking-ride-home-ad-card--has-img .booking-ride-home-ad-badge {
    background: rgba(15, 23, 42, 0.45);
}
.booking-ride-home-ad-card--ride {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.08) 42%, transparent 70%),
        linear-gradient(160deg, #dbeafe 0%, #93c5fd 48%, #1d4ed8 100%);
    color: #0c1b33;
}
.booking-ride-home-ad-card--parcel {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.08) 40%, transparent 68%),
        linear-gradient(160deg, #ffedd5 0%, #fdba74 46%, #c2410c 100%);
    color: #2a1408;
}
.booking-ride-home-ad-card--local {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.06) 40%, transparent 68%),
        linear-gradient(160deg, #ecfccb 0%, #86efac 45%, #15803d 100%);
    color: #0f2418;
}
.booking-ride-home-ad-card--national {
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.08) 40%, transparent 68%),
        linear-gradient(160deg, #e0e7ff 0%, #a5b4fc 46%, #4338ca 100%);
    color: #1e1b4b;
}
.booking-ride-home-ad-kicker {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.85;
}
.booking-ride-home-ad-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}
.booking-ride-home-ad-line {
    margin: 0;
    max-width: 92%;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0.92;
}
.booking-ride-home-ad-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.18);
    color: rgba(255, 255, 255, 0.95);
}

/* Brand / essentials footer under ads */
.booking-ride-home-brand-foot {
    margin: 4px 0 8px;
    padding: 16px 8px 8px;
    text-align: center;
    border-top: 1px solid #e8eaed;
}
.booking-ride-home-brand-name {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.booking-ride-home-brand-services {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    color: #1565c0;
}
.booking-ride-home-brand-points,
.booking-ride-home-brand-meta {
    margin: 0 0 6px;
    font-size: 11px;
    line-height: 1.45;
    color: #64748b;
}
.booking-ride-home-brand-copy {
    margin: 10px 0 0;
    font-size: 10px;
    color: #94a3b8;
}
.booking-ride-home-current-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}
.booking-ride-home-current-address {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #111;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
}
.booking-ride-home-current-chevron {
    font-size: 16px;
    color: #9ca3af;
    flex: none;
    line-height: 1;
}

/* Separate route page (pickup / drop) — leaves footer button bar visible */
.booking-ride-route-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: calc(58px + env(safe-area-inset-bottom, 0px));
    z-index: 12500;
    background: #fff;
    display: none;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
}
.booking-ride-route-page.open {
    display: flex;
}
.booking-ride-route-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    position: relative;
}
.booking-ride-route-back {
    border: none;
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #111;
    flex: none;
}
.booking-ride-route-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #111;
    flex: 1;
    min-width: 0;
    padding-right: 4px;
}
.booking-ride-schedule-wrap {
    position: relative;
    flex: none;
    margin-left: auto;
}
.booking-ride-schedule-btn {
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #111;
    font-size: 12px;
    font-weight: 600;
    padding: 7px 12px;
    border-radius: 999px;
    cursor: pointer;
    white-space: nowrap;
}
.booking-ride-schedule-btn.is-set {
    background: #111;
    color: #fff;
    border-color: #111;
}
.booking-ride-schedule-popover {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 40;
    width: min(260px, 78vw);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    padding: 12px;
}
.booking-ride-schedule-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}
.booking-ride-schedule-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}
.booking-ride-schedule-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}
.booking-ride-schedule-clear,
.booking-ride-schedule-apply {
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.booking-ride-schedule-clear {
    background: #f3f4f6;
    color: #374151;
}
.booking-ride-schedule-apply {
    background: #111;
    color: #fff;
}
.booking-ride-route-body {
    flex: 1;
    overflow: auto;
    padding: 14px 14px 24px;
}
.booking-ride-route-fields {
    background: #fff;
}
.booking-ride-trip-mode {
    margin: 0 0 12px;
    padding: 0 0 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.booking-ride-trip-mode-tabs {
    display: flex;
    gap: 8px;
}
.booking-ride-trip-mode-btn {
    flex: 1;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}
.booking-ride-trip-mode-btn.is-active {
    border-color: #1565c0;
    background: #e3f2fd;
    color: #0d47a1;
}
.booking-ride-trip-hours-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}
.booking-ride-trip-hours-wrap[hidden] {
    display: none !important;
}
.booking-ride-trip-hours-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #4b5563;
    flex: none;
}
.booking-ride-trip-hours {
    flex: 1;
    min-height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 0.92rem;
    background: #fff;
    color: #111827;
}
.booking-ride-home-field {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
}
.booking-ride-home-field--suggest {
    position: relative;
}
.booking-ride-home-drops .booking-ride-home-field:last-child {
    border-bottom: none;
}
.booking-ride-home-field-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: none;
    margin-top: 12px;
}
.booking-ride-home-field-dot--pickup {
    background: #1565c0;
}
.booking-ride-home-field-dot--drop {
    background: #d84315;
    border-radius: 2px;
}
.booking-ride-home-field-main {
    flex: 1;
    min-width: 0;
    position: relative;
}
.booking-ride-home-field input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    background: transparent;
    color: #111;
    padding: 8px 0;
    box-sizing: border-box;
}
.booking-ride-home-field input[readonly] {
    color: #333;
}
.booking-ride-home-pickup-clear,
.booking-ride-home-gps-refresh {
    border: none;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex: none;
    margin-top: 6px;
    padding: 4px 6px;
    color: #374151;
}
.booking-ride-home-pickup-clear {
    font-size: 22px;
    color: #6b7280;
}
.booking-ride-home-drop-remove {
    border: none;
    background: transparent;
    color: #9aa7b5;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    flex: none;
    margin-top: 8px;
}
.booking-ride-suggest {
    list-style: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% - 2px);
    margin: 0;
    padding: 4px 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    max-height: 220px;
    overflow: auto;
    z-index: 80;
}
.booking-ride-suggest-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    cursor: pointer;
}
.booking-ride-suggest-row:hover,
.booking-ride-suggest-row:focus {
    background: #f3f4f6;
}
.booking-ride-suggest-title {
    font-size: 13px;
    font-weight: 600;
    color: #111;
}
.booking-ride-suggest-sub {
    font-size: 12px;
    color: #6b7280;
}

.booking-ride-home-actions-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}
.booking-ride-home-select-map-btn,
.booking-ride-home-add-drop-btn {
    flex: 1;
    border: 1px solid #e5e7eb;
    background: #f3f4f6;
    color: #111;
    font-size: 13px;
    font-weight: 600;
    padding: 9px 10px;
    border-radius: 12px;
    cursor: pointer;
}

.booking-ride-home-submit-btn {
    width: 100%;
    margin-top: 10px;
    border: none;
    background: #111;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
}
.booking-ride-home-submit-btn:disabled {
    opacity: 0.7;
    cursor: default;
}

.booking-ride-home-surface-lead {
    margin: 0 0 10px;
    padding: 0 2px;
    font-size: 13px;
    line-height: 1.35;
    color: #546e7a;
}

.booking-ride-home-svc-grid--empty {
    display: block;
    padding: 4px 2px 8px;
}

/* Map-click pin picker for drop / stops (tracking GPS) */
.booking-ride-map-picker {
    position: fixed;
    inset: 0;
    z-index: 12000;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}
.booking-ride-map-picker-card {
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.2);
}
.booking-ride-map-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.booking-ride-map-picker-head h3 {
    margin: 0;
    font-size: 1.05rem;
    color: #111;
}
.booking-ride-map-picker-close {
    border: none;
    background: #f3f4f6;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    color: #374151;
}
.booking-ride-map-picker-hint {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}
.booking-ride-map-picker-map {
    width: 100%;
    height: min(52vh, 380px);
    border-radius: 12px;
    overflow: hidden;
    background: #e5e7eb;
    z-index: 0;
}
.booking-ride-map-picker-label {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: #111;
    min-height: 1.3em;
}
.booking-ride-map-picker-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.booking-ride-map-picker-confirm {
    border: none;
    background: #1565c0;
    color: #fff;
    font-weight: 700;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
}
.booking-ride-map-picker-confirm:disabled {
    opacity: 0.55;
    cursor: default;
}
.booking-ride-map-picker-cancel {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
    font-weight: 600;
    padding: 10px;
    border-radius: 12px;
    cursor: pointer;
}
