/* ==========================================================================
   Tripaure — inner pages (auth, booking, account)
   Loaded on top of tripaure-web.css by the pages that need it.
   Reuses the --tp-* tokens defined there; adds nothing to :root.
   ========================================================================== */

/* §  SOLID NAV
   The base .tp-nav floats transparently over the home hero. Inner pages have
   no hero, so they get a solid bar with the dark logo instead. */

.tp-nav-solid {
    position: sticky;
    background: #fff;
    box-shadow: 0 2px 14px rgba(var(--tp-text-dark-rgb), .08);
    padding: .9rem 0;
}

.tp-nav-solid .tp-nav-logo-desktop {
    display: none;
}

.tp-nav-solid .tp-nav-logo-mobile {
    display: block;
}

.tp-nav-solid .tp-lang-option {
    color: rgba(var(--tp-primary-rgb), .55);
}

.tp-nav-solid .tp-lang-option:hover,
.tp-nav-solid .tp-lang-option.active {
    color: var(--tp-primary);
}

.tp-nav-solid .tp-lang-sep {
    color: var(--tp-primary);
}

.tp-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .85);
    text-decoration: none;
    transition: color .2s ease;
}

.tp-nav-link i {
    font-size: 1.15rem;
}

.tp-nav-link:hover {
    color: #fff;
}

.tp-nav-solid .tp-nav-link {
    color: rgba(var(--tp-text-dark-rgb), .7);
}

.tp-nav-solid .tp-nav-link:hover {
    color: var(--tp-primary);
}

.tp-nav-link-btn {
    background: none;
    border: 0;
    padding: 0;
    font-family: inherit;
    cursor: pointer;
}

.tp-nav-logout {
    display: inline-flex;
    margin: 0;
}

/* §  PAGE SHELL */

.tp-page {
    padding: 3rem 0 4.5rem;
    background: var(--tp-bg-soft);
    min-height: 60vh;
}

.tp-page-head {
    margin-bottom: 2rem;
}

.tp-page-title {
    font-family: var(--tp-font-heading);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--tp-text-dark);
    margin: 0 0 .4rem;
}

.tp-page-sub {
    color: var(--tp-text-muted);
    font-size: 1rem;
    margin: 0;
}

.tp-card {
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-lg);
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(var(--tp-text-dark-rgb), .05);
}

.tp-card + .tp-card {
    margin-top: 1.25rem;
}

.tp-card-narrow {
    max-width: 480px;
    margin: 0 auto;
}

.tp-card-title {
    font-family: var(--tp-font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tp-text-dark);
    margin: 0 0 1.25rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid var(--tp-border);
}

.tp-section-title {
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--tp-accent-deep);
    margin: 0 0 1rem;
}

/* §  FORMS */

.tp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.1rem;
}

.tp-field-full {
    grid-column: 1 / -1;
}

.tp-label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--tp-text-dark);
    margin-bottom: .4rem;
}

.tp-label .req {
    color: #d64545;
}

.tp-input,
.tp-select,
.tp-textarea {
    width: 100%;
    padding: .7rem .9rem;
    font-family: inherit;
    font-size: .95rem;
    color: var(--tp-text-dark);
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-btn);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.tp-input:focus,
.tp-select:focus,
.tp-textarea:focus {
    outline: 0;
    border-color: var(--tp-accent);
    box-shadow: 0 0 0 3px rgba(var(--tp-accent-rgb), .15);
}

.tp-textarea {
    resize: vertical;
    min-height: 90px;
}

.tp-hint {
    display: block;
    font-size: .8rem;
    color: var(--tp-text-muted);
    margin-top: .35rem;
}

/* Matches the class public/js/tripaure-web.js injects for 422 field errors,
   so server-side and ajax validation look identical. */
.tp-field-error {
    display: block;
    font-size: .82rem;
    color: #d64545;
    margin-top: .35rem;
}

.tp-input.is-invalid,
.tp-select.is-invalid,
.tp-textarea.is-invalid {
    border-color: #d64545;
}

/* §  BOOKING WIZARD (multi-step form) */

.tp-stepper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.75rem;
}

.tp-stepper-item {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
    background: none;
    border: 0;
    padding: 0;
    font: inherit;
    color: var(--tp-text-muted);
    cursor: not-allowed;
}

.tp-stepper-item.is-unlocked {
    cursor: pointer;
}

/* Connector line, drawn between this item's circle and the next one's —
   inset-inline-* (not left/right) so it flips automatically in Arabic/RTL. */
.tp-stepper-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 17px;
    inset-inline-start: calc(50% + 21px);
    width: calc(100% - 42px);
    height: 2px;
    background: var(--tp-border);
    z-index: 0;
}

.tp-stepper-item.is-done::after,
.tp-stepper-item.is-active::after {
    background: var(--tp-accent);
}

.tp-stepper-num {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--tp-border);
    font-weight: 700;
    font-size: .95rem;
    color: var(--tp-text-muted);
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}

.tp-stepper-item.is-active .tp-stepper-num {
    background: var(--tp-accent);
    border-color: var(--tp-accent);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(var(--tp-accent-rgb), .18);
}

.tp-stepper-item.is-done .tp-stepper-num {
    background: var(--tp-accent-light);
    border-color: var(--tp-accent);
    color: var(--tp-accent-deep);
}

.tp-stepper-label {
    font-size: .82rem;
    font-weight: 600;
    text-align: center;
    transition: color .2s ease;
}

.tp-stepper-item.is-active .tp-stepper-label,
.tp-stepper-item.is-done .tp-stepper-label {
    color: var(--tp-text-dark);
}

/* Visibility is JS-driven (tripaure-book.js sets `hidden`) — this only adds
   the entrance animation. */
.tp-step.is-active {
    animation: tpStepIn .25s ease;
}

@keyframes tpStepIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 575.98px) {
    .tp-stepper-label {
        display: none;
    }
}

/* §  RADIO CARDS (trip type) */

.tp-choice-group {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.tp-choice-group-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* §  PICKUP DATE + TIME (booking form)
 * Two fields side by side: a date (flatpickr calendar) and a time (a plain
 * <select> of 15-minute slots). The calendar is re-skinned below to match the
 * site — its stock look (own font, small cells, default blue) didn't.
 */

.tp-datetime {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: .75rem;
}

.tp-datetime-date,
.tp-datetime-time {
    position: relative;
}

.tp-datetime > div > i {
    position: absolute;
    top: 50%;
    inset-inline-start: .85rem;
    transform: translateY(-50%);
    font-size: 1.15rem;
    color: var(--tp-accent-deep);
    pointer-events: none;
    z-index: 1;
}

.tp-datetime .tp-input,
.tp-datetime .tp-select {
    height: 52px;
    padding-top: 0;
    padding-bottom: 0;
    padding-inline-start: 2.5rem;
}

/* flatpickr's visible copy of the date field */
.tp-datetime .flatpickr-input[readonly] {
    background-color: #fff;
    cursor: pointer;
}

@media (max-width: 575.98px) {
    .tp-datetime {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* — calendar skin — */

.flatpickr-calendar.tp-fp {
    width: 330px;
    padding: .75rem;
    font-family: inherit;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    box-shadow: 0 18px 50px rgba(var(--tp-text-dark-rgb), .14);
}

.flatpickr-calendar.tp-fp::before,
.flatpickr-calendar.tp-fp::after {
    display: none; /* the little pointer arrow */
}

.tp-fp .flatpickr-months {
    align-items: center;
    padding-bottom: .5rem;
}

.tp-fp .flatpickr-months .flatpickr-month {
    height: 40px;
    color: var(--tp-text-dark);
}

.tp-fp .flatpickr-current-month {
    position: static;
    width: auto;
    height: auto;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 40px;
}

.tp-fp .flatpickr-current-month span.cur-month {
    margin: 0 .35rem;
    font-weight: 700;
}

.tp-fp .flatpickr-current-month input.cur-year {
    font-weight: 700;
}

.tp-fp .flatpickr-months .flatpickr-prev-month,
.tp-fp .flatpickr-months .flatpickr-next-month {
    position: static;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    color: var(--tp-text-dark);
    background: var(--tp-bg-soft);
    transition: background .15s ease;
}

.tp-fp .flatpickr-months .flatpickr-prev-month:hover,
.tp-fp .flatpickr-months .flatpickr-next-month:hover {
    background: var(--tp-accent-light);
}

.tp-fp .flatpickr-months .flatpickr-prev-month svg,
.tp-fp .flatpickr-months .flatpickr-next-month svg {
    width: 12px;
    height: 12px;
    fill: currentColor;
}

.tp-fp .flatpickr-months .flatpickr-disabled {
    visibility: hidden;
}

.tp-fp .flatpickr-innerContainer,
.tp-fp .flatpickr-rContainer,
.tp-fp .flatpickr-days,
.tp-fp .dayContainer {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.tp-fp span.flatpickr-weekday {
    font-size: .78rem;
    font-weight: 600;
    color: var(--tp-text-muted);
}

.tp-fp .flatpickr-day {
    max-width: none;
    height: 40px;
    line-height: 38px;
    margin: 1px 0;
    font-size: .92rem;
    color: var(--tp-text-dark);
    border-radius: var(--tp-radius-btn);
}

.tp-fp .flatpickr-day:hover,
.tp-fp .flatpickr-day:focus {
    background: var(--tp-accent-light);
    border-color: transparent;
}

.tp-fp .flatpickr-day.today {
    border-color: var(--tp-accent);
    font-weight: 700;
}

.tp-fp .flatpickr-day.selected,
.tp-fp .flatpickr-day.selected:hover {
    color: #fff;
    background: var(--tp-primary);
    border-color: var(--tp-primary);
    font-weight: 700;
}

.tp-fp .flatpickr-day.flatpickr-disabled,
.tp-fp .flatpickr-day.flatpickr-disabled:hover {
    color: rgba(var(--tp-text-dark-rgb), .22);
    background: transparent;
    cursor: not-allowed;
}

.tp-fp .flatpickr-day.prevMonthDay,
.tp-fp .flatpickr-day.nextMonthDay {
    visibility: hidden; /* the month reads cleaner without neighbours */
}

/* Right-to-left on Arabic pages: the flex rows flip on their own; the arrow
   glyphs need mirroring by hand. */
.flatpickr-calendar.tp-fp-rtl {
    direction: rtl;
}

.tp-fp-rtl .flatpickr-prev-month svg,
.tp-fp-rtl .flatpickr-next-month svg {
    transform: scaleX(-1);
}

/* §  BOOKING LAYOUT — steps + always-visible summary
 * Desktop: the steps, with a sticky summary beside them. Phone: the steps
 * full width, the summary folded into a bottom bar that opens as a sheet.
 */

.tp-book-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.5rem;
    align-items: start;
}

.tp-book-main {
    min-width: 0;
}

.tp-book-aside {
    position: sticky;
    top: 96px;
}

.tp-book-aside-card {
    padding: 1.25rem 1.35rem;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-lg);
    box-shadow: 0 10px 40px rgba(var(--tp-text-dark-rgb), .06);
}

.tp-book-bar {
    display: none;
}

@media (max-width: 991.98px) {
    .tp-book-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .tp-book-main {
        padding-bottom: 5rem; /* room above the fixed bar */
    }

    .tp-book-aside {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        top: auto;
        z-index: 160; /* above the floating WhatsApp button (150) */
    }

    .tp-book-bar {
        display: flex;
        align-items: center;
        gap: .75rem;
        width: 100%;
        padding: .9rem 1.1rem;
        font: inherit;
        color: #fff;
        background: var(--tp-primary-deep);
        border: 0;
        border-radius: var(--tp-radius) var(--tp-radius) 0 0;
        box-shadow: 0 -6px 24px rgba(var(--tp-text-dark-rgb), .18);
    }

    .tp-book-bar-label {
        flex: 1 1 auto;
        opacity: .8;
        font-size: .88rem;
        text-align: start;
    }

    .tp-book-bar-price {
        font-size: 1.05rem;
        color: #fff;
        direction: ltr;
        unicode-bidi: isolate;
    }

    .tp-book-bar .bx {
        font-size: 1.4rem;
        transition: transform .2s ease;
    }

    .tp-book-aside.is-open .tp-book-bar .bx {
        transform: rotate(180deg);
    }

    .tp-book-aside-card {
        display: none;
        max-height: 60vh;
        overflow-y: auto;
        border-radius: 0;
        box-shadow: none;
    }

    .tp-book-aside.is-open .tp-book-aside-card {
        display: block;
    }
}

/* §  FROM / TO — each end: Airport | Border crossing | Address */

.tp-route-end + .tp-route-end {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--tp-border);
}

.tp-route-end .tp-label .bx {
    color: var(--tp-accent-deep);
}

.tp-segment {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .4rem;
    padding: .3rem;
    margin-bottom: .75rem;
    background: var(--tp-bg-soft);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-btn);
}

.tp-segment-item {
    margin: 0;
    cursor: pointer;
}

.tp-segment-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tp-segment-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .6rem .5rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--tp-text-muted);
    text-align: center;
    border-radius: calc(var(--tp-radius-btn) - 3px);
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.tp-segment-item input:checked + span {
    color: var(--tp-primary);
    background: #fff;
    box-shadow: 0 2px 8px rgba(var(--tp-text-dark-rgb), .1);
}

.tp-segment-item input:focus-visible + span {
    outline: 2px solid var(--tp-accent);
}

@media (max-width: 420px) {
    .tp-segment-item span {
        flex-direction: column;
        gap: .1rem;
        font-size: .78rem;
    }
}

/* §  VEHICLE CARDS — each with its price for this route */

.tp-vehicles {
    display: grid;
    gap: .6rem;
    margin-top: .4rem;
}

.tp-vehicle {
    margin: 0;
    cursor: pointer;
}

.tp-vehicle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tp-vehicle-body {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .85rem 1rem;
    background: #fff;
    border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius);
    transition: border-color .15s ease, background .15s ease;
}

.tp-vehicle:hover .tp-vehicle-body {
    border-color: rgba(var(--tp-accent-rgb), .6);
}

.tp-vehicle input:checked + .tp-vehicle-body {
    background: var(--tp-accent-light);
    border-color: var(--tp-primary);
}

.tp-vehicle input:focus-visible + .tp-vehicle-body {
    outline: 2px solid var(--tp-accent);
}

.tp-vehicle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    height: 44px;
    font-size: 1.5rem;
    color: var(--tp-primary);
    background: var(--tp-bg-soft);
    border-radius: 50%;
}

.tp-vehicle-text {
    display: flex;
    flex: 1 1 auto; /* pushes the price to the far edge in either direction */
    flex-direction: column;
    min-width: 0;
}

.tp-vehicle-text strong {
    color: var(--tp-text-dark);
}

.tp-vehicle-text small {
    color: var(--tp-text-muted);
}

.tp-vehicle-price {
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--tp-text-dark);
    white-space: nowrap;
    direction: ltr;
}

.tp-vehicle-price.is-quote {
    font-size: .8rem;
    font-weight: 600;
    color: var(--tp-text-muted);
    white-space: normal;
    text-align: end;
    direction: inherit;
}

.tp-vehicle.is-disabled {
    cursor: not-allowed;
}

.tp-vehicle.is-disabled .tp-vehicle-body {
    opacity: .45;
    background: var(--tp-bg-soft);
}

/* §  SUMMARY / REVIEW — side panel, phone sheet and the last step */

.tp-review {
    margin-top: 1.5rem;
    padding: 1.1rem 1.25rem;
    background: var(--tp-bg-soft);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
}

.tp-review-title {
    margin: 0 0 .75rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--tp-text-dark);
}

.tp-review-list {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: .35rem .9rem;
    margin: 0;
    font-size: .9rem;
}

.tp-review-list dt {
    font-weight: 500;
    color: var(--tp-text-muted);
}

.tp-review-list dd {
    margin: 0;
    color: var(--tp-text-dark);
    overflow-wrap: anywhere;
}

.tp-review-price {
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px dashed var(--tp-border);
}

.tp-review-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--tp-text-dark);
}

.tp-review-line strong {
    white-space: nowrap;
}

.tp-review-line.is-total strong {
    font-size: 1.35rem;
    color: var(--tp-primary);
}

.tp-review-note {
    margin: 0;
    font-size: .88rem;
    color: var(--tp-text-muted);
}

/* §  LIVE FARE (booking form) */

.tp-fare {
    margin-top: 1.25rem;
    padding: 1rem 1.25rem;
    border: 1.5px dashed var(--tp-border);
    border-radius: var(--tp-radius-btn);
    background: var(--tp-bg-soft);
}

.tp-fare-title {
    display: block;
    margin-bottom: .35rem;
    font-weight: 600;
    color: var(--tp-text-dark);
}

.tp-fare-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    color: var(--tp-text-dark);
}

.tp-fare-line strong {
    white-space: nowrap;
}

.tp-fare-note {
    margin: .35rem 0 0;
    font-size: .875rem;
    color: var(--tp-text-muted);
}

.tp-booking-line {
    margin: .5rem 0 0;
    color: var(--tp-text-muted);
}

.tp-booking-line a {
    color: var(--tp-primary);
    font-weight: 600;
}

.tp-choice {
    position: relative;
}

.tp-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tp-choice-label {
    display: block;
    padding: .9rem 1rem;
    border: 1.5px solid var(--tp-border);
    border-radius: var(--tp-radius-btn);
    cursor: pointer;
    transition: border-color .2s ease, background .2s ease;
}

.tp-choice-label strong {
    display: block;
    font-size: .95rem;
    color: var(--tp-text-dark);
}

.tp-choice-label span {
    font-size: .82rem;
    color: var(--tp-text-muted);
}

.tp-choice input:checked + .tp-choice-label {
    border-color: var(--tp-accent);
    background: var(--tp-accent-light);
}

.tp-choice input:focus-visible + .tp-choice-label {
    box-shadow: 0 0 0 3px rgba(var(--tp-accent-rgb), .2);
}

/* §  MAP PICKER */

.tp-map {
    height: 260px;
    border-radius: var(--tp-radius-btn);
    border: 1px solid var(--tp-border);
    margin-top: .6rem;
    z-index: 0;
}

.tp-map-hint {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    color: var(--tp-text-muted);
    margin-top: .4rem;
}

/* §  ALERTS — moved to tripaure-web.css (loaded globally; the shared flash
   partial can render on any page, not just the ones that push this file). */

/* §  TRIP CARDS (account) — collapsed by default, .tp-trip-toggle expands
   the .tp-trip-details panel via aria-expanded (see tripaure-web.js). */

.tp-trip {
    /* Hard clip: a nowrap address deep inside a column-direction flex item
       (mobile) can otherwise force the whole page into horizontal scroll
       instead of just truncating within the card. */
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    transition: border-color .2s ease, box-shadow .2s ease;
}

.tp-trip:hover {
    border-color: rgba(var(--tp-accent-rgb), .5);
    box-shadow: 0 8px 26px rgba(var(--tp-text-dark-rgb), .06);
}

.tp-trip + .tp-trip {
    margin-top: .85rem;
}

.tp-trip-toggle {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    width: 100%;
    min-width: 0;
    padding: .5rem 1.25rem 1.25rem;
    background: none;
    border: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
}

.tp-trip-body {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.tp-trip-ref {
    display: block;
    padding: 1.25rem 1.25rem 0;
    font-family: var(--tp-font-heading);
    font-weight: 700;
    color: var(--tp-text-dark);
    font-size: 1rem;
    text-decoration: none;
}

.tp-trip-ref:hover {
    color: var(--tp-accent-deep);
}

.tp-trip-route {
    font-size: .9rem;
    color: var(--tp-text-muted);
    margin: .35rem 0 0;
    display: flex;
    align-items: center;
    gap: .4rem;
    width: 100%;
    min-width: 0;
}

/* One line each, truncated — full addresses move to the expanded panel
   so a long real-world address can't blow up the collapsed card's height. */
.tp-trip-route span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    flex: 1 1 0;
}

.tp-trip-route i {
    flex-shrink: 0;
}

.tp-trip-when {
    font-size: .85rem;
    color: var(--tp-text-dark);
    margin-top: .5rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.tp-trip-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .6rem;
    flex-shrink: 0;
}

.tp-trip-chevron {
    font-size: 1.3rem;
    color: var(--tp-text-muted);
    transition: transform .25s ease;
}

.tp-trip-toggle[aria-expanded="true"] .tp-trip-chevron {
    transform: rotate(180deg);
    color: var(--tp-accent-deep);
}

.tp-trip-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
}

.tp-trip-details-inner {
    margin: 0 1.25rem;
    padding: 1.1rem 0 1.25rem;
    border-top: 1px solid var(--tp-border);
}

/* A narrower label column for .tp-dl where the value needs more room, e.g.
   a full street address. */
.tp-dl.tp-dl-compact {
    grid-template-columns: minmax(90px, 140px) 1fr;
}

/* Label above value, for narrow cards (same as the mobile layout). */
.tp-dl.tp-dl-stacked {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
}
.tp-dl.tp-dl-stacked dt {
    padding-bottom: 0;
    border-bottom: 0;
}
.tp-dl.tp-dl-stacked dd {
    padding-top: .2rem;
}

.tp-trip-details-actions {
    margin-top: 1rem;
}

/* §  BADGES */

.tp-badge {
    display: inline-block;
    padding: .28rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}

.tp-badge-warning { background: #fff3d6; color: #8a5a00; }
.tp-badge-info    { background: #dff1fb; color: #10627f; }
.tp-badge-primary { background: #e2ecff; color: #1a4ba8; }
.tp-badge-success { background: #e2f7ec; color: #1c6b45; }
.tp-badge-danger  { background: #fde5e5; color: #972828; }
.tp-badge-secondary { background: #eceff3; color: #4d5c6e; }

/* §  DEFINITION ROWS (trip detail) */

.tp-dl {
    display: grid;
    grid-template-columns: minmax(120px, 180px) 1fr;
    gap: .1rem 1.25rem;
}

.tp-dl dt {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--tp-text-muted);
    padding: .6rem 0;
}

.tp-dl dd {
    margin: 0;
    padding: .6rem 0;
    font-size: .95rem;
    color: var(--tp-text-dark);
    word-break: break-word;
}

.tp-dl dt + dd {
    border-bottom: 1px solid rgba(var(--tp-text-dark-rgb), .06);
}

.tp-dl dt {
    border-bottom: 1px solid rgba(var(--tp-text-dark-rgb), .06);
}

/* No rule under the last row — it doubled up with a following divider/card edge. */
.tp-dl dt:last-of-type,
.tp-dl dd:last-of-type {
    border-bottom: 0;
}

/* §  TRIP ROUTE + FACTS (account trip details) */

/* Pickup → drop-off as a vertical route line. */
.tp-route {
    position: relative;
    display: grid;
    gap: 1.25rem;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--tp-border);
}
.tp-route-stop {
    position: relative;
    padding-inline-start: 2.25rem;
    color: var(--tp-text-dark);
    line-height: 1.6;
}
/* Dashed segment from this stop's dot down to the next one. */
.tp-route-stop:not(.is-end)::after {
    content: "";
    position: absolute;
    inset-inline-start: 7px;
    top: 18px;
    bottom: calc(-1.25rem - 2px);
    border-inline-start: 2px dashed rgba(var(--tp-primary-rgb), .35);
}
.tp-route-stop small,
.tp-fact small {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--tp-text-muted);
}
.tp-route-dot {
    position: absolute;
    inset-inline-start: 0;
    top: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    border: 4px solid var(--tp-primary);
}
.tp-route-stop.is-end .tp-route-dot {
    background: var(--tp-primary-deep);
    border-color: var(--tp-primary-deep);
}

.tp-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem;
}
.tp-fact {
    padding: .9rem 1rem;
    border-radius: var(--tp-radius);
    background: var(--tp-bg-soft);
    border: 1px solid rgba(var(--tp-primary-rgb), .08);
    color: var(--tp-text-dark);
    font-weight: 500;
}
.tp-fact i {
    font-size: 1.35rem;
    color: var(--tp-primary);
    margin-bottom: .35rem;
}

/* §  EMPTY STATE */

.tp-empty {
    text-align: center;
    padding: 3rem 1.5rem;
}

.tp-empty i {
    font-size: 3rem;
    color: rgba(var(--tp-accent-rgb), .45);
    display: block;
    margin-bottom: .75rem;
}

.tp-empty p {
    color: var(--tp-text-muted);
    margin: 0 0 1.25rem;
}

/* §  ACCOUNT SHELL (profile / trips / security sub-nav) */

.tp-account-nav {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    background: #fff;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-lg);
    padding: .75rem;
}

.tp-account-nav-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .65rem .85rem;
    border-radius: var(--tp-radius-btn);
    font-size: .92rem;
    font-weight: 600;
    color: var(--tp-text-dark);
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
}

.tp-account-nav-link i {
    font-size: 1.2rem;
    color: var(--tp-text-muted);
}

.tp-account-nav-link:hover {
    background: var(--tp-bg-soft);
}

.tp-account-nav-link.is-active {
    background: var(--tp-accent-light);
    color: var(--tp-accent-deep);
}

.tp-account-nav-link.is-active i {
    color: var(--tp-accent-deep);
}

@media (max-width: 991.98px) {
    .tp-account-nav {
        flex-direction: row;
        overflow-x: auto;
    }

    .tp-account-nav-link {
        white-space: nowrap;
    }
}

/* §  AVATAR */

.tp-avatar-row {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.tp-avatar-img,
.tp-avatar-fallback {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tp-avatar-img {
    object-fit: cover;
    border: 1px solid var(--tp-border);
}

.tp-avatar-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-accent-light);
    color: var(--tp-accent-deep);
    font-weight: 700;
    font-size: 1.4rem;
}

.tp-avatar-actions {
    display: flex;
    gap: .6rem;
    flex-wrap: wrap;
}

/* §  FLOATING ACTION BUTTON (account / trips) */

.tp-fab {
    /* Stacked above .scroll-to-top (style.css: right/bottom 20px, 40px tall)
       rather than sharing its corner, so the two never overlap once both
       are visible past the scroll threshold. */
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tp-accent);
    color: #fff;
    box-shadow: 0 10px 30px rgba(var(--tp-accent-rgb), .45);
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
    z-index: 999;
}

.tp-fab i {
    font-size: 1.6rem;
}

.tp-fab:hover {
    background: var(--tp-accent-deep);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(var(--tp-accent-rgb), .55);
}

[dir="rtl"] .tp-fab {
    right: auto;
    left: 20px;
}

@media (max-width: 767.98px) {
    .tp-fab {
        bottom: 80px;
        right: 16px;
        width: 50px;
        height: 50px;
    }

    [dir="rtl"] .tp-fab {
        left: 16px;
    }
}

/* §  MISC */

.tp-auth-links {
    margin-top: 1.25rem;
    text-align: center;
    font-size: .9rem;
    color: var(--tp-text-muted);
}

.tp-auth-links a {
    color: var(--tp-accent-deep);
    font-weight: 600;
    text-decoration: none;
}

.tp-auth-links a:hover {
    text-decoration: underline;
}

.tp-form-actions {
    margin-top: 1.75rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.tp-divider {
    height: 1px;
    background: var(--tp-border);
    margin: 1.5rem 0;
}

.tp-btn-block {
    width: 100%;
    justify-content: center;
}

.tp-btn-ghost {
    background: transparent;
    border: 1.5px solid var(--tp-border);
    color: var(--tp-text-dark);
}

.tp-btn-ghost:hover {
    border-color: var(--tp-accent);
    color: var(--tp-accent-deep);
}

.tp-btn-danger {
    background: #d64545;
    color: #fff;
}

.tp-btn-danger:hover {
    background: #b83a3a;
    color: #fff;
}

@media (max-width: 767.98px) {

    .tp-form-grid,
    .tp-choice-group,
    .tp-choice-group-3 {
        grid-template-columns: minmax(0, 1fr);
    }

    .tp-card {
        padding: 1.35rem;
    }

    .tp-page {
        padding: 1.75rem 0 3rem;
    }

    .tp-dl,
    .tp-dl.tp-dl-compact {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .tp-dl dt {
        padding-bottom: 0;
        border-bottom: 0;
    }

    .tp-trip-toggle {
        flex-direction: column;
        gap: .75rem;
    }

    .tp-trip-meta {
        flex-direction: row;
        align-items: center;
        width: 100%;
        justify-content: space-between;
    }
}

/* On the booking page the price bar owns the bottom edge on phones, so the
   floating WhatsApp / back-to-top buttons sit above it instead of on it. */
@media (max-width: 991.98px) {
    body:has(.tp-book-aside) .tp-whatsapp-float,
    body:has(.tp-book-aside) .scroll-to-top {
        bottom: 84px;
    }
}
