/*
 * Ridesoho only (task 507, phase 2): the website booking form's app-parity
 * pieces (public/js/site/booking-parity.js). Loaded by the booking form only
 * while config('ridesoho.web_booking_parity') is on. Theme tokens only
 * (gotaxi-site.css :root); tints are the brand's light colour, never a
 * light red - the error state is the error colour's outline, not a fill.
 */

/* Highlights on a fare card: short text points, two lines at most each. */
.service-card-highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.service-card-highlights[hidden] { display: none; }
.service-card-highlights li { position: relative; padding-inline-start: 16px; font-size: var(--gt-fs-xs); line-height: 1.4; color: var(--gt-text-2); overflow-wrap: anywhere; }
.service-card-highlights li::before {
    content: ""; position: absolute; inset-inline-start: 2px; top: .5em; width: 6px; height: 6px; border-radius: 50%;
    background: var(--gt-accent);
}

/* The policy tick, first in the final step's sticky footer, full width over the buttons. */
.gt-bf .booking-wizard-step .gt-bf-actions.gt-bf-actions--sticky:has(> .gt-policy-agree:not([hidden])) { flex-wrap: wrap; }
.gt-policy-agree { flex: 1 0 100%; order: -1; display: grid; gap: 4px; padding: 8px 10px; border: 1.5px solid transparent; border-radius: 10px; transition: border-color .15s ease; }
.gt-policy-agree[hidden] { display: none; }
.gt-policy-agree.is-error { border-color: var(--gt-danger); }
.gt-policy-check { align-items: flex-start; font-size: var(--gt-fs-sm); color: var(--gt-text); line-height: 1.45; }
.gt-policy-check input { margin-top: 1px; }
.gt-policy-agree.is-error .gt-policy-check input { border-color: var(--gt-danger); }
.gt-policy-link {
    display: inline; padding: 0; border: 0; background: none; font: inherit; color: var(--gt-accent-deep);
    text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.gt-policy-link:focus-visible { outline: 2px solid var(--gt-accent-deep); outline-offset: 2px; border-radius: 2px; }
.gt-policy-agree-error { font-size: var(--gt-fs-xs); font-weight: 500; color: var(--gt-danger); padding-inline-start: 32px; }
.gt-policy-agree-error[hidden] { display: none; }
/* Wrapping lets the row take its own line; the buttons still share the next one
   (Back at its width, the forward button the rest), as without the row. */
@media (max-width: 767px) {
    .gt-bf .booking-wizard-step .gt-bf-actions.gt-bf-actions--sticky:has(> .gt-policy-agree:not([hidden])) #bookingFormBtn { flex: 1 1 0%; min-width: 0; }
}
@media (max-width: 359px) { .gt-policy-agree { order: 99; } }

/* Dull until ticked, still pressable (a press flags the tick). */
.gt-bf #bookingFormBtn.gt-btn--dull { opacity: .4; }

/* The Cancellation & Waiting Policy sheet. */
.gt-policy-modal {
    width: min(480px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 16px;
    background: var(--gt-bg); color: var(--gt-text); box-shadow: 0 24px 48px -12px rgb(16 24 40 / .3);
}
.gt-policy-modal::backdrop { background: rgb(16 24 40 / .45); }
.gt-policy-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.gt-policy-modal-title { margin: 0; font-size: var(--gt-fs-lg); font-weight: 600; color: var(--gt-ink); }
.gt-policy-modal-close {
    display: grid; place-items: center; width: 44px; height: 44px; margin: -8px -10px -8px 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--gt-text-2); cursor: pointer;
}
.gt-policy-modal-close:hover { background: var(--gt-bg-2); }
.gt-policy-modal-close:focus-visible { outline: 2px solid var(--gt-accent-deep); outline-offset: 0; }
.gt-policy-rows { list-style: none; margin: 0; padding: 6px 20px; display: grid; gap: 14px; }
.gt-policy-row { display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; }
.gt-policy-badge { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
.gt-policy-badge--neutral { background: var(--gt-bg-2); color: var(--gt-ink); }
.gt-policy-badge--solid { background: var(--gt-accent); color: var(--gt-accent-ink); }
.gt-policy-badge--tint { background: var(--gt-accent-soft); color: var(--gt-accent-deep); }
.gt-policy-say { display: grid; gap: 2px; min-width: 0; }
.gt-policy-row-title { font-size: var(--gt-fs-md); font-weight: 500; color: var(--gt-ink); }
.gt-policy-row-body { font-size: var(--gt-fs-sm); line-height: 1.45; color: var(--gt-text-2); }
.gt-policy-foot { margin: 12px 20px 20px; padding: 12px 14px; border-radius: 12px; background: var(--gt-bg-2); }
.gt-policy-foot-title { margin: 0 0 4px; font-size: var(--gt-fs-sm); font-weight: 500; color: var(--gt-ink); }
.gt-policy-foot-terms { margin: 0; font-size: var(--gt-fs-sm); color: var(--gt-text-2); }
.gt-policy-terms-link { color: var(--gt-accent-deep); text-decoration: underline; text-underline-offset: 2px; }

/* The flight card. */
.gt-flight-card { margin: 0; padding: 0; border: 0; min-width: 0; display: grid; gap: var(--gt-s3); }
.gt-flight-title { display: flex; align-items: center; gap: 6px; float: none; width: auto; margin: 0 0 4px; padding: 0; }
.gt-flight-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gt-s3); }
.gt-flight-grid[hidden] { display: none; }
@media (max-width: 575px) { .gt-flight-grid { grid-template-columns: minmax(0, 1fr); } }
/* Task 846: "Flight Details (for Airport Service)" - shown for an airport trip only (flight-details.js),
   Commercial | Private Jet (FBO) | Train as one segmented control; three boxes a row on a desktop. */
.gt-flight-card[hidden], .gt-bf-col:has(> .gt-flight-card[hidden]) { display: none; }
.gt-flight-card .gt-flight-grid:not([data-gt-fbo]) { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
/* Boxes line up although only the airline has a counter under it. */
.gt-flight-card .gt-flight-grid { align-items: start; }
.gt-flight-card .gt-flight-kind { justify-items: start; }
.gt-flight-card .gt-field[hidden] { display: none; }
.gt-flight-seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--gt-line, #e4e7ec); border-radius: 10px; background: var(--gt-bg-2); max-width: 100%; }
.gt-flight-segbtn { position: relative; display: inline-flex; align-items: center; margin: 0; min-height: 40px; padding: 0 16px; border-radius: 8px; font-size: var(--gt-fs-sm); font-weight: 500; color: var(--gt-text-2); cursor: pointer; }
.gt-flight-segbtn[hidden] { display: none; }
.gt-flight-segbtn input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.gt-flight-segbtn:has(input:checked) { background: var(--gt-bg); color: var(--gt-ink); box-shadow: 0 1px 2px rgb(16 24 40 / .12); }
.gt-flight-segbtn:has(input:focus-visible) { outline: 2px solid var(--gt-accent-deep); outline-offset: 1px; }
.gt-flight-card .gt-req { color: var(--gt-danger); }
@media (max-width: 575px) {
    .gt-flight-seg { display: flex; width: 100%; }
    .gt-flight-segbtn { flex: 1 1 0; justify-content: center; padding: 0 8px; text-align: center; }
}

/* The trip options in one line and the total, at the end of Payment & Offers. */
@media (min-width: 768px) { .gt-dsec > .gt-trip-sum { margin-inline-start: 44px; } }
.gt-trip-sum { display: grid; gap: 8px; margin-top: var(--gt-s4); padding: 12px 14px; border-radius: 12px; background: var(--gt-accent-soft); }
.gt-trip-sum-line { margin: 0; font-size: var(--gt-fs-sm); color: var(--gt-text-2); overflow-wrap: anywhere; }
.gt-trip-total { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 12px; }
.gt-trip-total[hidden] { display: none; }
.gt-trip-total-label { font-size: var(--gt-fs-sm); color: var(--gt-text-2); }
.gt-trip-total-value { font-size: var(--gt-fs-lg); font-weight: 600; color: var(--gt-ink); font-variant-numeric: tabular-nums; }
.gt-trip-total-note { grid-column: 1 / -1; font-size: var(--gt-fs-xs); color: var(--gt-muted); }
