/* Transfer Booking Pro — public booking form */

/* form + map layout. Position comes from the "Map position" design setting
   (right / left / top / bottom). The map matches the form size: same width
   when stacked, same width & height when side by side. On narrow containers
   the side positions gracefully stack (never overlap). */
.tbp-container { container-type: inline-size; width: 100%; }

/* Break out of narrow theme content columns for the side-by-side positions:
   the wrapper widens to the viewport (capped at 1200px) and centres itself.
   !important is needed because block themes clamp children with
   "max-width: <content-size> !important" (e.g. 645px in Twenty Twenty-Five). */
.tbp-container.tbp-breakout {
    --tbp-bleed: min(1200px, calc(100vw - 48px));
    width: var(--tbp-bleed) !important;
    max-width: none !important;
    margin-left: calc(50% - var(--tbp-bleed) / 2) !important;
    margin-right: 0 !important;
}

.tbp-layout { display: block; }
.tbp-layout.tbp-has-map {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.tbp-map-panel {
    width: 100%;
    min-width: 0;
    max-width: var(--tbp-form-max, 760px);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}
/* map above the form */
.tbp-map-top .tbp-map-panel { order: -1; }
#tbp-form-map {
    width: 100%;
    height: 340px;
    border-radius: 12px;
    box-shadow: 0 6px 24px rgba(15, 23, 42, .10);
    background: #e2e8f0;
}
@container (min-width: 880px) {
    /* --tbp-map-col lets JS resize the map column (step-2 map width setting) */
    .tbp-layout.tbp-map-right, .tbp-layout.tbp-map-left {
        display: grid;
        align-items: stretch; /* map column matches the form height */
    }
    .tbp-layout.tbp-map-right { grid-template-columns: minmax(0, 1fr) var(--tbp-map-col, minmax(0, 1fr)); }
    .tbp-layout.tbp-map-left { grid-template-columns: var(--tbp-map-col, minmax(0, 1fr)) minmax(0, 1fr); }
    .tbp-layout.tbp-map-left .tbp-map-panel { order: -1; }
    .tbp-layout.tbp-map-right #tbp-form-map, .tbp-layout.tbp-map-left #tbp-form-map {
        flex: 1 1 auto;
        height: auto;
        min-height: 420px;
    }
    /* form and map columns get identical width (margin:auto would shrink the grid item) */
    .tbp-layout.tbp-map-right .tbp-form, .tbp-layout.tbp-map-left .tbp-form {
        max-width: none;
        width: 100%;
        margin: 0;
    }
    .tbp-layout.tbp-map-right .tbp-map-panel, .tbp-layout.tbp-map-left .tbp-map-panel {
        max-width: none;
        margin: 0;
    }
}
/* per-step map visibility (Form Design → show map on step 1/2/3) */
.tbp-layout.tbp-map-hidden { display: block !important; }
.tbp-layout.tbp-map-hidden .tbp-map-panel { display: none !important; }
.tbp-layout.tbp-map-hidden .tbp-form { margin: 0 auto; max-width: var(--tbp-form-max, 760px); }
/* …but the wide mode (side panels on steps 2/3) always wins over the cap */
.tbp-layout .tbp-form.tbp-wide,
.tbp-layout.tbp-map-hidden .tbp-form.tbp-wide {
    max-width: none !important;
    width: 100%;
    margin: 0;
}

.tbp-map-info {
    margin-top: 10px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
    padding: 10px 16px;
    font-size: 15px;
    display: none;
}
.tbp-map-info.visible { display: flex; justify-content: space-around; gap: 12px; }
.tbp-map-info b { font-size: 16px; }
.tbp-map-info span { text-align: center; }
.tbp-map-info small { display: block; color: #64748b; }

.tbp-form {
    margin: 0 auto;
    background: var(--tbp-bg, #fff);
    color: var(--tbp-text, #1e293b);
    font-size: var(--tbp-font-size, 15px);
    border-radius: var(--tbp-radius, 10px);
    box-shadow: var(--tbp-shadow);
    padding: 26px 28px;
    box-sizing: border-box;
}
.tbp-form *, .tbp-form *:before, .tbp-form *:after { box-sizing: border-box; }

.tbp-loading { text-align: center; padding: 30px 0; color: var(--tbp-label); }

/* campaign banner */
.tbp-banner {
    background: var(--tbp-banner-bg, #16a34a);
    color: var(--tbp-banner-text, #fff);
    border-radius: var(--tbp-radius, 10px);
    padding: 12px 18px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 18px;
}

/* steps indicator */
.tbp-steps { display: flex; gap: 6px; margin-bottom: 22px; }
.tbp-steps span {
    flex: 1; height: 5px; border-radius: 99px;
    background: var(--tbp-border, #e2e8f0);
    transition: background .25s;
}
.tbp-steps span.done { background: var(--tbp-primary, #d4a853); }

/* layout */
.tbp-row { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px; }
/* stops container: hide when empty so it never occupies a grid cell
   (two-column layout would misalign pickup/drop-off otherwise) */
#tbp-stops:empty, #tbp-rstops:empty { display: none; }
.tbp-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
@media (max-width: 560px) { .tbp-row-2 { grid-template-columns: 1fr; } }

.tbp-field { display: flex; flex-direction: column; gap: 5px; }
.tbp-field > label {
    font-size: calc(var(--tbp-font-size, 15px) - 1px);
    font-weight: 600;
    color: var(--tbp-label, #475569);
}
.tbp-field .tbp-req { color: #dc2626; }

.tbp-field input, .tbp-field select, .tbp-field textarea {
    width: 100%;
    height: var(--tbp-field-height, 46px);
    padding: 0 14px;
    font-size: var(--tbp-font-size, 15px);
    color: var(--tbp-text, #1e293b);
    background: #fff;
    border: 1px solid var(--tbp-border, #e2e8f0);
    border-radius: calc(var(--tbp-radius, 10px) * .6);
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.tbp-field textarea { height: auto; min-height: 84px; padding: 10px 14px; resize: vertical; }
.tbp-field input:focus, .tbp-field select:focus, .tbp-field textarea:focus {
    border-color: var(--tbp-primary, #d4a853);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tbp-primary, #d4a853) 22%, transparent);
}
.tbp-field.tbp-invalid input, .tbp-field.tbp-invalid select { border-color: #dc2626; }
.tbp-field .tbp-error-text { color: #dc2626; font-size: 13.5px; }

/* trip type toggle */
.tbp-trip-toggle { display: flex; border: 1px solid var(--tbp-border); border-radius: 99px; overflow: hidden; margin-bottom: 18px; width: max-content; }
.tbp-trip-toggle button {
    border: 0; background: transparent; cursor: pointer;
    padding: 10px 26px; font-size: var(--tbp-font-size);
    color: var(--tbp-text); transition: all .15s;
}
.tbp-trip-toggle button.active {
    background: var(--tbp-primary); color: var(--tbp-primary-text); font-weight: 600;
}

/* return section reveal */
.tbp-return-section {
    border: 1px dashed var(--tbp-border);
    border-radius: var(--tbp-radius);
    padding: 16px;
    margin-bottom: 14px;
    animation: tbpFade .25s ease-out;
}
.tbp-return-section h4 { margin: 0 0 12px; font-size: var(--tbp-font-size); }

@keyframes tbpFade { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* buttons */
.tbp-btn {
    display: inline-block; border: 0; cursor: pointer;
    background: var(--tbp-primary, #d4a853);
    color: var(--tbp-primary-text, #fff);
    font-size: var(--tbp-font-size, 15px);
    font-weight: 700;
    height: var(--tbp-field-height, 46px);
    padding: 0 34px;
    border-radius: calc(var(--tbp-radius, 10px) * .6);
    transition: filter .15s, transform .05s;
}
.tbp-btn:hover { filter: brightness(1.07); }
.tbp-btn:active { transform: translateY(1px); }
.tbp-btn:disabled { opacity: .55; cursor: not-allowed; }
.tbp-btn-ghost {
    background: transparent;
    color: var(--tbp-text);
    border: 1px solid var(--tbp-border);
    font-weight: 500;
}
.tbp-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; }

/* vehicle cards */
.tbp-vehicles { display: flex; flex-direction: column; gap: 14px; }
/* grid layout for the vehicle step (Form Design → Vehicle list layout) */
.tbp-vehicles.tbp-veh-grid {
    display: grid;
    grid-template-columns: repeat(var(--tbp-vehcols, 2), minmax(0, 1fr));
    align-items: stretch;
}
.tbp-vehicles.tbp-veh-grid .tbp-vehicle { grid-template-columns: 1fr; align-content: start; }
.tbp-vehicles.tbp-veh-grid .tbp-vehicle img { height: var(--tbp-vehimg, 160px); object-fit: cover; }
.tbp-vehicles.tbp-veh-grid .tbp-vehicle-price { text-align: left; }
@media (max-width: 640px) { .tbp-vehicles.tbp-veh-grid { grid-template-columns: 1fr; } }
.tbp-vehicle {
    display: grid; grid-template-columns: var(--tbp-vehcol, 190px) 1fr auto;
    gap: 16px; align-items: center;
    border: 2px solid var(--tbp-border);
    border-radius: var(--tbp-radius);
    padding: 14px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.tbp-vehicle:hover { border-color: color-mix(in srgb, var(--tbp-primary) 55%, var(--tbp-border)); }
.tbp-vehicle.selected { border-color: var(--tbp-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tbp-primary) 20%, transparent); }
.tbp-vehicle img { width: 100%; border-radius: calc(var(--tbp-radius) * .6); display: block; }
.tbp-vehicle .tbp-vehicle-noimg { width: 100%; aspect-ratio: 3/2; background: var(--tbp-border); border-radius: calc(var(--tbp-radius) * .6); display: flex; align-items: center; justify-content: center; font-size: 34px; }
.tbp-vehicle h4 { margin: 0 0 6px; font-size: calc(var(--tbp-font-size) + 2px); }
.tbp-vehicle p {
    margin: 0 0 8px; color: var(--tbp-label); font-size: calc(var(--tbp-font-size) - 1px);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tbp-vehicle .tbp-vehicle-meta { display: flex; gap: 14px; color: var(--tbp-label); font-size: calc(var(--tbp-font-size) - 1px); flex-wrap: wrap; }
.tbp-vehicle-price { text-align: right; }
.tbp-vehicle-price .tbp-price { font-size: calc(var(--tbp-font-size) + 7px); font-weight: 800; color: var(--tbp-text); white-space: nowrap; }
.tbp-price-old {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: calc(var(--tbp-font-size) - 0.5px);
    font-weight: 600;
    white-space: nowrap;
}
.tbp-save {
    color: #16a34a;
    font-size: calc(var(--tbp-font-size) - 1.5px);
    font-weight: 700;
    white-space: nowrap;
}
.tbp-vehicle-price .tbp-btn { margin-top: 8px; padding: 0 22px; height: 40px; }
@media (max-width: 640px) {
    .tbp-vehicle { grid-template-columns: 1fr; }
    .tbp-vehicle-price { text-align: left; }
}

/* ---- step 2: journey details panel + vehicle cards ---- */
/* wide mode: the form drops its max-width so vehicles + panel fit side by side */
.tbp-container.tbp-breakout-wide {
    --tbp-bleed: min(1200px, calc(100vw - 48px));
    width: var(--tbp-bleed) !important;
    max-width: none !important;
    margin-left: calc(50% - var(--tbp-bleed) / 2) !important;
    margin-right: 0 !important;
}
.tbp-form.tbp-wide { max-width: none; width: 100%; margin: 0; }

.tbp-step2 { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
@container (min-width: 880px) {
    .tbp-step2-right { grid-template-columns: minmax(0, 1fr) 340px; }
    .tbp-step2-left { grid-template-columns: 340px minmax(0, 1fr); }
    .tbp-step2-left .tbp-s2-panel { order: -1; }
}
.tbp-s2-panel {
    background: color-mix(in srgb, var(--tbp-primary) 4%, var(--tbp-bg));
    border: 1px solid var(--tbp-border);
    border-radius: var(--tbp-radius);
    padding: 16px;
    align-self: start;
    position: sticky;
    top: 16px;
}
.tbp-s2-title { margin: 0 0 12px; font-size: calc(var(--tbp-font-size) + 1px); }
.tbp-s2-panel .tbp-field { margin-bottom: 10px; }
.tbp-s2-mapslot { margin-top: 14px; }
.tbp-s2-mapslot .tbp-map-panel { max-width: none; margin: 0; }
.tbp-s2-mapslot #tbp-form-map { height: 240px !important; min-height: 240px; border-radius: calc(var(--tbp-radius) * .7); }
.tbp-layout.tbp-map-moved { display: block !important; }
.tbp-layout.tbp-map-moved .tbp-form { max-width: none; margin: 0; width: 100%; }

.tbp-s2-bar {
    display: flex; flex-wrap: wrap; gap: 8px 26px;
    background: color-mix(in srgb, var(--tbp-primary) 8%, var(--tbp-bg));
    border: 1px solid var(--tbp-border);
    border-radius: calc(var(--tbp-radius) * .7);
    padding: 10px 16px; margin-bottom: 16px;
    font-size: calc(var(--tbp-font-size) - 0.5px);
}

.tbp-badge-pill {
    display: inline-block; vertical-align: middle;
    background: #dcfce7; color: #166534;
    font-size: calc(var(--tbp-font-size) - 2px);
    font-weight: 700; line-height: 1;
    border-radius: 99px; padding: 4px 10px; margin-left: 6px;
}
.tbp-veh-features {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px;
    margin-top: 8px;
    font-size: calc(var(--tbp-font-size) - 1.5px);
    color: var(--tbp-label);
}
@media (max-width: 560px) { .tbp-veh-features { grid-template-columns: 1fr; } }
.tbp-veh-icon {
    width: 100%; aspect-ratio: 12/5;
    display: flex; align-items: center; justify-content: center;
    color: var(--tbp-text);
    background: color-mix(in srgb, var(--tbp-primary) 5%, var(--tbp-bg));
    border-radius: calc(var(--tbp-radius) * .6);
    padding: 8px 14px;
}
.tbp-veh-icon svg { width: 100%; height: auto; max-height: 90px; }

/* ---- step 3: "Your booking details" card ---- */
.tbp-s3-vehicle { text-align: center; margin-bottom: 14px; }
.tbp-s3-vehicle img { max-width: 78%; border-radius: calc(var(--tbp-radius) * .6); }
.tbp-s3-vehicle .tbp-veh-icon { max-width: 78%; margin: 0 auto; }
.tbp-s3-vehicle h4 { margin: 8px 0 6px; font-size: calc(var(--tbp-font-size) + 2px); }
.tbp-s3-perks { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.tbp-s3-perks span {
    border: 1px solid #86efac; color: #166534; background: #f0fdf4;
    border-radius: 99px; padding: 4px 10px;
    font-size: calc(var(--tbp-font-size) - 2px); font-weight: 600;
}
.tbp-s3-route { border-top: 1px solid var(--tbp-border); margin-top: 14px; padding-top: 12px; }
.tbp-s3-point { display: flex; gap: 10px; padding: 5px 0; align-items: flex-start; }
.tbp-s3-point small { display: block; color: var(--tbp-label); font-size: calc(var(--tbp-font-size) - 2px); text-transform: uppercase; letter-spacing: .4px; }
.tbp-s3-point b { font-size: calc(var(--tbp-font-size) - 0.5px); }
.tbp-dot { width: 11px; height: 11px; border-radius: 50%; border: 3px solid var(--tbp-label); margin-top: 5px; flex-shrink: 0; }
.tbp-dot-a { border-color: var(--tbp-primary); background: var(--tbp-primary); }
.tbp-dot-b { border-color: var(--tbp-text); }
.tbp-s3-chips { display: flex; gap: 6px; margin-top: 4px; }
.tbp-s3-chips span {
    background: color-mix(in srgb, var(--tbp-primary) 9%, var(--tbp-bg));
    border: 1px solid var(--tbp-border); border-radius: 7px;
    padding: 3px 8px; font-size: calc(var(--tbp-font-size) - 1.5px); font-weight: 600;
}
.tbp-s3-meta {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
    border-top: 1px solid var(--tbp-border); margin-top: 12px; padding-top: 12px;
}
.tbp-s3-meta small { display: block; color: var(--tbp-label); font-size: calc(var(--tbp-font-size) - 2px); text-transform: uppercase; letter-spacing: .4px; }
.tbp-s3-capacity {
    background: color-mix(in srgb, var(--tbp-primary) 7%, var(--tbp-bg));
    border: 1px solid var(--tbp-border);
    border-radius: calc(var(--tbp-radius) * .7);
    padding: 12px 16px; margin-bottom: 14px;
    font-size: calc(var(--tbp-font-size) - 0.5px);
}

/* extras */
.tbp-extra {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    border: 1px solid var(--tbp-border); border-radius: calc(var(--tbp-radius) * .7);
    padding: 12px 16px; margin-bottom: 10px;
}
.tbp-extra-img { width: 64px; height: 64px; object-fit: cover; border-radius: calc(var(--tbp-radius, 10px) * .5); flex-shrink: 0; }
.tbp-extra-info { flex: 1; }
.tbp-extra-info b { display: block; }
.tbp-extra-info small { color: var(--tbp-label); }
.tbp-extra-controls { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.tbp-extra-controls .tbp-extra-price { font-weight: 700; }
.tbp-extra-controls input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--tbp-primary); }
.tbp-extra-controls input[type="number"] { width: 64px; height: 36px; padding: 0 8px; border: 1px solid var(--tbp-border); border-radius: 8px; }

/* coupon */
.tbp-coupon { display: flex; gap: 10px; }
.tbp-coupon input { flex: 1; }
.tbp-coupon .tbp-btn { padding: 0 20px; }
.tbp-coupon-msg { font-size: 14px; margin-top: 6px; }
.tbp-coupon-msg.ok { color: #16a34a; }
.tbp-coupon-msg.bad { color: #dc2626; }

/* payment method radio cards */
.tbp-pay-options { display: flex; flex-wrap: wrap; gap: 10px; }
.tbp-pay-option {
    display: flex; align-items: center; gap: 8px;
    border: 2px solid var(--tbp-border);
    border-radius: calc(var(--tbp-radius) * .7);
    padding: 10px 16px; cursor: pointer;
    font-weight: 600; transition: border-color .15s, box-shadow .15s;
}
.tbp-pay-option input { accent-color: var(--tbp-primary); width: 18px; height: 18px; }
.tbp-pay-option.selected {
    border-color: var(--tbp-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--tbp-primary) 18%, transparent);
}

/* summary */
.tbp-summary {
    background: color-mix(in srgb, var(--tbp-primary) 7%, var(--tbp-bg));
    border: 1px solid var(--tbp-border);
    border-radius: var(--tbp-radius);
    padding: 16px 20px; margin: 18px 0;
}
.tbp-summary-row { display: flex; justify-content: space-between; padding: 5px 0; font-size: calc(var(--tbp-font-size) - 0.5px); }
.tbp-summary-row.discount { color: #16a34a; }
.tbp-summary-row.total {
    border-top: 2px solid var(--tbp-border); margin-top: 8px; padding-top: 12px;
    font-size: calc(var(--tbp-font-size) + 4px); font-weight: 800;
}

/* success screen */
.tbp-success { text-align: center; padding: 30px 10px; }
.tbp-success .tbp-success-icon { font-size: 56px; }
.tbp-success h3 { font-size: calc(var(--tbp-font-size) + 8px); margin: 12px 0 6px; }
.tbp-success .tbp-ref { font-size: calc(var(--tbp-font-size) + 4px); font-weight: 800; color: var(--tbp-primary); }

.tbp-global-error { background: #fee2e2; color: #991b1b; border-radius: 8px; padding: 10px 16px; margin-bottom: 14px; }

/* Google Places dropdown above modals/themes */
.pac-container { z-index: 100002 !important; }

/* 1.14 — vehicles too small for the group (capacity filter, "disable" mode) */
.tbp-vehicle.tbp-vehicle-unfit { opacity: .5; cursor: not-allowed; filter: grayscale(.7); }
.tbp-vehicle.tbp-vehicle-unfit:hover { transform: none; box-shadow: none; }
.tbp-unfit-note { font-size: 14px; font-weight: 700; color: #b91c1c; text-align: right; line-height: 1.3; }
.tbp-unfit-note small { display: block; font-weight: 400; color: var(--tbp-label, #64748b); }
/* note under the total (Settings → Price Summary) */
.tbp-summary-note { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--tbp-border, #e2e8f0); font-size: 14px; color: var(--tbp-label, #64748b); line-height: 1.5; }
.tbp-summary-row small { color: var(--tbp-label, #64748b); font-weight: 400; }
/* step 2: "Update quote" asks for a click after a change (e.g. return added) */
.tbp-pulse { animation: tbp-pulse 1.2s ease-in-out 3; }
@keyframes tbp-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
    50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, .35); }
}


/* UK postcode → address list (under the address field) */
.tbp-pc-list {
    position: absolute; left: 0; right: 0; top: 100%; z-index: 10000;
    max-height: 320px; overflow-y: auto; margin-top: 2px;
    background: #fff; border: 1px solid #cbd5e1; border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .18);
}
.tbp-pc-list[hidden] { display: none; }
.tbp-pc-item {
    display: block; width: 100%; text-align: left; padding: 9px 12px;
    background: none; border: 0; border-bottom: 1px solid #eef2f7;
    font: inherit; font-size: 15px; color: #1e3a8a; cursor: pointer; line-height: 1.35;
}
.tbp-pc-item:hover, .tbp-pc-item.active { background: #eff6ff; }
.tbp-pc-empty { padding: 10px 12px; color: #64748b; font-size: 15px; }
.tbp-pc-open .pac-container { display: none !important; }

/* ---- clear, modern typography (Inter, with system fonts as fallback) ---- */
.tbp-form, .tbp-form input, .tbp-form select, .tbp-form textarea, .tbp-form button,
.tbp-pc-list, .tbp-map-info, .tbp-global-error {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    -webkit-font-smoothing: antialiased;
    letter-spacing: 0;
}
.tbp-form { line-height: 1.5; }
.tbp-form label { font-weight: 600; }
