/* TripWays native Bokun checkout (pilot). Scoped under .tripways-native-checkout / .twnc-*. */

.tripways-native-checkout {
    width: 100%;
    min-width: 0;
    font-size: 14px;
    line-height: 1.45;
    color: #1d2327;
    background: transparent;
    box-sizing: border-box;
}

.tripways-native-checkout *,
.tripways-native-checkout *::before,
.tripways-native-checkout *::after {
    box-sizing: border-box;
}

.twnc-boot,
.twnc-cal-loading {
    padding: 24px 8px;
    text-align: center;
    color: #646970;
}

.twnc-error {
    color: #c92a2a;
    font-size: 13px;
    min-height: 1em;
    margin: 6px 0;
}

.twnc-error-box,
.twnc-pending-box {
    padding: 14px;
    border-radius: 8px;
    background: #fff4f4;
    border: 1px solid #f3c4c4;
    color: #8a1f1f;
    margin-bottom: 10px;
}

.twnc-pending-box {
    background: #fffbe6;
    border-color: #f0e2a0;
    color: #6b5900;
}

/* Buttons */
.twnc-btn {
    display: inline-block;
    width: 100%;
    max-width: 100%;
    padding: 11px 16px;
    border-radius: 8px;
    border: 0;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
    transition: background 0.15s ease;
}

.twnc-btn-primary {
    background: #0a7d43;
    color: #fff;
}
.twnc-btn-primary:hover:not(:disabled) { background: #086637; color: #fff; }
.twnc-btn-primary:disabled { background: #9bbfa9; cursor: not-allowed; }

.twnc-btn-secondary {
    background: #f0f0f1;
    color: #1d2327;
    margin-top: 8px;
    text-decoration: none;
}

.twnc-link {
    background: none;
    border: 0;
    color: #0a7d43;
    cursor: pointer;
    padding: 0;
    font-size: 13px;
}

/* Calendar */
.twnc-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.twnc-cal-label { font-weight: 600; }

.twnc-cal-nav {
    background: #f0f0f1;
    border: 0;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    font-size: 16px;
    cursor: pointer;
}

.twnc-cal-nav:disabled { opacity: 0.35; cursor: not-allowed; }

.twnc-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.twnc-cal-dow {
    text-align: center;
    font-size: 11px;
    color: #646970;
    padding: 4px 0;
}

.twnc-cal-day {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #f0faf4;
    cursor: pointer;
    padding: 3px 0;
}

.twnc-cal-day:hover:not(:disabled) { border-color: #0a7d43; }
.twnc-cal-day.twnc-selected { background: #0a7d43; color: #fff; }
.twnc-cal-day.twnc-selected .twnc-cal-price { color: #d4f2e0; }
.twnc-cal-day.twnc-unavailable,
.twnc-cal-day.twnc-empty {
    background: transparent;
    color: #c4c8cc;
    cursor: default;
}

.twnc-cal-num { font-size: 13px; font-weight: 600; }
.twnc-cal-price { font-size: 10px; color: #0a7d43; }

/* Details */
.twnc-sel-date {
    font-weight: 600;
    margin: 8px 0 4px;
}

.twnc-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #50575e;
    margin: 12px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.twnc-times {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.twnc-time {
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #fff;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 13px;
}

.twnc-time.twnc-selected {
    background: #0a7d43;
    border-color: #0a7d43;
    color: #fff;
}

.twnc-times--combo {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
}

.twnc-time--combo {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
}

.twnc-time-clock {
    font-weight: 700;
    flex: 0 0 auto;
}

.twnc-time-pkg {
    font-weight: 500;
    min-width: 0;
}

.twnc-pax-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f1;
}

.twnc-pax-label { font-size: 13px; }

.twnc-pax-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.twnc-step {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #dcdcde;
    background: #fff;
    font-size: 15px;
    cursor: pointer;
    line-height: 1;
}

.twnc-step:disabled { opacity: 0.35; cursor: not-allowed; }
.twnc-pax-count { min-width: 18px; text-align: center; font-weight: 600; }

.twnc-extra-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f1;
}

.twnc-extra-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.twnc-extra-title { font-size: 13px; font-weight: 600; }
.twnc-extra-price { font-size: 12px; color: #0a7d43; }
.twnc-extra-info { font-size: 12px; color: #646970; }

.twnc-promo {
    margin: 0;
    padding: 14px 0;
    border-top: 1px solid #e2e4e7;
    border-bottom: 1px solid #e2e4e7;
}

.twnc-promo-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    margin: 0 0 8px;
}

.twnc-promo-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    min-width: 0;
}

.twnc-promo-input {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    margin-bottom: 0;
}

.twnc-promo-apply {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
    margin-top: 0;
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
}

.twnc-promo-ok {
    font-size: 12px;
    color: #0a7d43;
    margin-top: 6px;
}

.twnc-input,
.twnc-select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    margin-bottom: 6px;
}

.twnc-input.twnc-invalid,
.twnc-select.twnc-invalid { border-color: #c92a2a; }

.twnc-check-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    margin: 8px 0;
    cursor: pointer;
}

.twnc-check-row input { margin-top: 2px; }

.twnc-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    padding: 10px 0;
    border-top: 2px solid #1d2327;
    margin-top: 12px;
}

.twnc-note {
    font-size: 12px;
    color: #646970;
    margin: 8px 0 0;
}

/* Modal */
body.twnc-modal-open { overflow: hidden; }

.twnc-overlay {
    position: fixed;
    inset: 0;
    background: rgba(20, 23, 26, 0.55);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.twnc-modal {
    position: relative;
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

@media (max-width: 600px) {
    .twnc-overlay { padding: 0; align-items: stretch; }
    .twnc-modal { max-width: none; max-height: none; border-radius: 0; }
}

.twnc-modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: 0;
    font-size: 26px;
    line-height: 1;
    color: #646970;
    cursor: pointer;
}

.twnc-modal-header h3 { margin: 0 0 4px; font-size: 17px; }
.twnc-modal-sub { color: #646970; font-size: 13px; }
.twnc-modal-total { font-weight: 700; margin-top: 6px; }

.twnc-h4 { margin: 16px 0 8px; font-size: 15px; }
.twnc-h5 { margin: 12px 0 4px; font-size: 13px; }

.twnc-field { margin-bottom: 8px; }
.twnc-help { font-size: 12px; color: #646970; }

.twnc-policy {
    margin: 10px 0;
    font-size: 13px;
    border: 1px solid #e2e4e7;
    border-radius: 6px;
    padding: 8px 10px;
}

.twnc-policy summary { cursor: pointer; font-weight: 600; }

.twnc-consent { border-top: 1px solid #f0f0f1; padding-top: 10px; }
.twnc-consent a { color: #0a7d43; }

.twnc-turnstile { margin: 8px 0; min-height: 0; }

.twnc-hidden { display: none; }

.twnc-stripe-element { margin: 12px 0; min-height: 120px; }

/* Confirmation */
.twnc-confirmed { text-align: center; padding: 4px 0; width: 100%; min-width: 0; }

.twnc-confirmed-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 8px;
    border-radius: 50%;
    background: #0a7d43;
    color: #fff;
    font-size: 26px;
    line-height: 48px;
}

.twnc-confirmed h3 { margin: 0 0 6px; }
.twnc-code-row strong { font-size: 16px; letter-spacing: 0.05em; }

.twnc-confirmed-docs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    width: 100%;
    max-width: 100%;
}

.twnc-confirmed-docs .twnc-btn {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    margin-top: 0;
    padding: 8px 10px;
    font-size: 13px;
}

.twnc-confirmed-dash {
    margin-top: 8px;
}

/* Native-only sticky rail (widget tours stay static — Bokun iframe nested-scroll). */
@media (min-width: 981px) {
    .tripways-tour-page--native {
        overflow-x: clip;
    }
    .tripways-tour-layout--native .tripways-tour-sidebar {
        position: sticky;
        top: 24px;
        align-self: start;
        z-index: 3;
        max-height: calc(100vh - 48px);
        overflow-y: auto;
    }
    body.admin-bar .tripways-tour-layout--native .tripways-tour-sidebar {
        top: 56px;
    }
}

/* Mobile: rail (date, travelers, options) sits under the gallery. */
@media (max-width: 980px) {
    .tripways-tour-layout.tripways-tour-layout--native {
        display: flex;
        flex-direction: column;
        /* Base .tripways-tour-layout uses align-items: start (grid). On a
           column flex that shrinks the booking card to min-content (~215px). */
        align-items: stretch;
    }
    .tripways-tour-layout--native .tripways-tour-main,
    .tripways-tour-layout--native .tripways-tour-lead-media {
        display: contents;
    }
    .tripways-tour-layout--native .tripways-tour-hero {
        order: 1;
    }
    .tripways-tour-layout--native .tripways-tour-after-gallery-meta {
        order: 2;
    }
    .tripways-tour-layout--native #book,
    .tripways-tour-layout--native .tripways-tour-sidebar {
        order: 3;
    }
    .tripways-tour-layout--native .tripways-why-we-love-it {
        order: 4;
    }
    .tripways-tour-layout--native .tripways-tour-content,
    .tripways-tour-layout--native .tripways-tour-sections {
        order: 5;
    }
    .tripways-tour-layout--native .tripways-tour-sidebar,
    .tripways-tour-layout--native .tripways-tour-sidebar__box,
    .tripways-tour-layout--native #tripways-native-checkout,
    .tripways-tour-layout--native .twnc-rail {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }
    body:has(.tripways-tour-page--native):has(#tripways-sticky-cta) {
        padding-bottom: calc(110px + env(safe-area-inset-bottom, 0));
    }
    .tripways-tour-page--native .twnc-options-footer,
    .tripways-tour-page--native .twnc-rail {
        scroll-margin-bottom: 120px;
    }
    /* Hide sticky Book Now while the native rail occupies the viewport so
       its hit area cannot cover Select a date. The bar is a sibling of
       <main>, not a descendant. Show it again when the rail is off-screen
       (the shared tour script treats a negative top as still in view).
       Do not toggle body padding (2.8.47 CLS). */
    body:has(.tripways-tour-page--native) #tripways-sticky-cta.twnc-rail-in-view {
        transform: translateY(100%);
        visibility: hidden;
        pointer-events: none;
    }
    body:has(.tripways-tour-page--native) #tripways-sticky-cta:not(.twnc-rail-in-view) {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
    }
}

/* Compact OTA rail */
.twnc-rail {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.twnc-rail-price {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
}

.twnc-rail-price strong {
    font-size: 22px;
    letter-spacing: -0.02em;
}

.twnc-rail-price-note {
    font-size: 13px;
    color: #646970;
}

.twnc-rail-field {
    display: block;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 10px;
    padding: 10px 12px;
    cursor: pointer;
}

.twnc-rail-field:hover,
.twnc-rail-field:focus-visible {
    border-color: #0a7d43;
    outline: none;
}

.twnc-rail-field-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #646970;
    margin-bottom: 2px;
}

.twnc-rail-field-value {
    font-size: 15px;
    font-weight: 600;
    color: #1d2327;
}

.twnc-rail-field[aria-expanded="true"] {
    border-color: #0a7d43;
}

.twnc-rail-cal {
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    padding: 8px 8px 10px;
    background: #fff;
}

.twnc-rail-cal .twnc-cal-label {
    font-size: 13px;
}

.twnc-rail-cal .twnc-cal-nav {
    width: 28px;
    height: 28px;
}

.twnc-rail-cal .twnc-cal-dow {
    font-size: 10px;
    padding: 2px 0;
}

.twnc-rail-cal .twnc-cal-day {
    min-height: 32px;
    padding: 1px 0;
}

.twnc-rail-cal .twnc-cal-num {
    font-size: 12px;
}

.twnc-rail-cal .twnc-cal-price {
    display: none;
}

.twnc-rail-cal .twnc-cal-loading {
    padding: 14px 4px;
    font-size: 13px;
}

.twnc-rail-pax {
    border: 1px solid #e2e4e7;
    border-radius: 10px;
    padding: 4px 10px 8px;
    background: #fafafa;
}

.twnc-rail-trust {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.twnc-rail-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 4px;
}

.twnc-rail-options .twnc-label {
    margin: 8px 0 4px;
}

.twnc-rail-options .twnc-rate-card {
    padding: 10px 12px;
    border-radius: 10px;
}

.twnc-rail-options .twnc-rate-card-title {
    font-size: 14px;
}

.twnc-rail-options .twnc-rate-card-price {
    font-size: 14px;
}

.twnc-rail-options .twnc-rate-card-desc {
    font-size: 12px;
}

.twnc-rail-breakdown {
    border: 1px dashed #d0d4d9;
    border-radius: 10px;
    padding: 10px 12px 8px;
    background: #fafafa;
}

.twnc-rail-breakdown-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #646970;
    margin-bottom: 2px;
}

.twnc-rail-breakdown-when {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
}

.twnc-rail-breakdown-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    padding: 3px 0;
}

.twnc-rail-breakdown-amt {
    color: #50575e;
    white-space: nowrap;
}

.twnc-rail-breakdown-row--total {
    margin-top: 6px;
    padding-top: 8px;
    border-top: 1px dashed #d0d4d9;
    font-weight: 600;
}

.twnc-rail-options .twnc-input,
.twnc-rail-options .twnc-select {
    margin-bottom: 4px;
    font-size: 13px;
}

.twnc-trust-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    color: #1d2327;
    line-height: 1.35;
}

.twnc-trust-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 1px;
    border-radius: 50%;
    background: #0a7d43;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
}

/* Options live in the compact rail (times / rates / pickup / drop-off). */
.tripways-booking-options {
    display: none;
}

.twnc-options-body .twnc-cal {
    display: none;
}

.twnc-scarcity {
    font-size: 13px;
    font-weight: 600;
    color: #b54708;
    margin: 8px 0 0;
}

.twnc-rate-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 8px;
}

.twnc-rate-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    width: 100%;
    text-align: left;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 14px;
    cursor: pointer;
}

.twnc-rate-card:hover {
    border-color: #0a7d43;
}

.twnc-rate-card.twnc-unpriced {
    cursor: not-allowed;
    opacity: 0.78;
    background: #f6f7f7;
}

.twnc-rate-card.twnc-unpriced:hover {
    border-color: #dcdcde;
}

.twnc-rate-card.twnc-unpriced .twnc-rate-card-price {
    font-weight: 600;
    font-size: 14px;
    color: #646970;
}

.twnc-rate-card.twnc-selected {
    border-color: #0a7d43;
    box-shadow: 0 0 0 1px #0a7d43;
    background: #f6fbf8;
    padding-top: 16px;
}

.twnc-rate-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.twnc-rate-card-title {
    font-weight: 700;
    font-size: 15px;
    line-height: 1.35;
}

.twnc-rate-card-copy {
    font-size: 13px;
    color: #50575e;
    margin-top: 4px;
}

.twnc-rate-card-desc {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.45;
    color: #50575e;
    white-space: pre-line;
}

.twnc-rate-card-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e2e4e7;
}

.twnc-rate-card-flags {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.twnc-rate-card-flags .twnc-rate-meta-icon {
    margin-top: 0;
}

.twnc-rate-card-badge {
    position: absolute;
    top: -9px;
    right: 10px;
    background: #0a7d43;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
}

.twnc-rate-meta-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #1d2327;
}

.twnc-rate-meta-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: #2271b1;
}

.twnc-rate-meta-row--cancel .twnc-rate-meta-icon {
    color: #646970;
}

.twnc-rate-meta-label {
    font-weight: 600;
}

.twnc-rate-cancel-list {
    margin: 4px 0 0;
    padding-left: 18px;
    color: #50575e;
}

.twnc-rate-cancel-list li {
    margin: 2px 0;
}

.twnc-place-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 10px;
}

.twnc-place-head-title {
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}

.twnc-place-badge {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 600;
    color: #50575e;
    background: #f0f0f1;
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
}

.twnc-place-prompt {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #1d2327;
    margin: 0 0 8px;
}

.twnc-req {
    color: #c92a2a;
    font-weight: 700;
}

.twnc-place-combo {
    position: relative;
    margin: 0 0 8px;
}

.twnc-place-combo .twnc-input {
    padding-right: 36px;
    margin-bottom: 0;
}

.twnc-place-combo-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    background: transparent;
    color: #50575e;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
}

.twnc-place-results {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 280px;
    overflow-y: auto;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

.twnc-place-option,
.twnc-place-empty {
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.35;
}

.twnc-place-option {
    cursor: pointer;
}

.twnc-place-option:hover,
.twnc-place-option--active {
    background: #f6fbf8;
}

.twnc-place-empty {
    color: #646970;
}

.twnc-place-address {
    margin-top: 10px;
}

.twnc-place-address-label {
    font-size: 12px;
    font-weight: 600;
    color: #646970;
    margin: 0 0 6px;
}

.twnc-place-address-input {
    min-height: 56px;
    resize: vertical;
}

.twnc-rate-card-price {
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

.twnc-rate-card-action {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #0a7d43;
}

.twnc-options-footer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e4e7;
}

.twnc-options-total {
    font-size: 16px;
    font-weight: 700;
}

/* /book/ checkout page — focused chrome, boxed steps, sticky summary */
body.tripways-book-checkout {
    background: #f4f5f7;
    color: #1d2327;
}

body.tripways-book-checkout .tripways-header,
body.tripways-book-checkout .tripways-footer-links,
body.tripways-book-checkout .tripways-footer-legal-row,
body.tripways-book-checkout .tripways-footer,
body.tripways-book-checkout header.site-header,
body.tripways-book-checkout #masthead,
body.tripways-book-checkout footer.site-footer,
body.tripways-book-checkout #colophon,
body.tripways-book-checkout .otsi-login-wrapper,
body.tripways-book-checkout .otsi-user-profile {
    display: none !important;
}

body.tripways-book-checkout #primary.site-main {
    background: transparent;
}

.tripways-book-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #fff;
    border-bottom: 1px solid #e6e8eb;
}

body.admin-bar .tripways-book-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .tripways-book-header {
        top: 46px;
    }
}

.tripways-book-header__inner {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px 20px;
    max-width: 1120px;
    margin: 0 auto;
    padding: 10px 20px;
}

.tripways-book-header__logo,
.tripways-book-header .custom-logo-link {
    justify-self: start;
    display: inline-flex;
    align-items: center;
}

.tripways-book-header .custom-logo {
    display: block;
    height: 32px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
}

.tripways-book-header__title {
    font-weight: 700;
    font-size: 18px;
    color: #1d2327;
    text-decoration: none;
}

.tripways-book-steps {
    justify-self: center;
    width: min(100%, 560px);
    max-width: 100%;
    min-width: 0;
}

.tripways-book-steps__list {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 100%;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tripways-book-step {
    position: relative;
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    color: #8a8f94;
}

.tripways-book-step--done,
.tripways-book-step--current {
    color: #1d2327;
}

.tripways-book-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 12px;
    left: calc(50% + 12px);
    width: calc(100% - 24px);
    height: 2px;
    background: #d0d4d8;
    pointer-events: none;
}

.tripways-book-step__link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.tripways-book-step__link:hover {
    color: #0a7d43;
}

.tripways-book-step__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #e8eaed;
    color: #50575e;
    font-size: 12px;
    line-height: 1;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.tripways-book-step--done .tripways-book-step__mark {
    background: #1d2327;
    color: #fff;
}

.tripways-book-step--current .tripways-book-step__mark {
    background: #0a7d43;
    color: #fff;
}

body.tripways-book-checkout--confirmed .tripways-book-step .tripways-book-step__mark {
    background: #1d2327;
    color: #fff;
}

.tripways-book-step__label {
    display: block;
    text-align: center;
    line-height: 1.25;
    max-width: 100%;
}

.tripways-book-page {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 28px 20px 40px;
    box-sizing: border-box;
}

.tripways-book-page__inner {
    width: 100%;
}

.twnc-book {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 28px;
    align-items: start;
}

.twnc-book-form {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.twnc-step-box {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 20px 20px 18px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    scroll-margin-top: 96px;
}

body.admin-bar .twnc-step-box {
    scroll-margin-top: 128px;
}

.twnc-step-box__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
}

.twnc-step-box__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #123a6d;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}

.twnc-step-box__title {
    margin: 0;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 700;
}

.twnc-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 14px;
}

.twnc-extra-contact {
    display: contents;
}

.twnc-field--wide {
    grid-column: 1 / -1;
}

.twnc-book-rail {
    position: sticky;
    top: 84px;
    min-width: 0;
}

body.admin-bar .twnc-book-rail {
    top: 116px;
}

.twnc-book-summary {
    border: 1px solid #e2e4e7;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.twnc-book-trust {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 14px;
    padding: 0 4px;
}

.twnc-book-summary__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
}

.twnc-book-summary__title {
    margin: 0;
    font-size: 16px;
}

.twnc-book-summary__edit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 600;
    color: #0a7d43;
    text-decoration: none;
}

.twnc-book-summary__edit:hover {
    text-decoration: underline;
}

.twnc-book-summary__edit-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.twnc-book-summary__product {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.twnc-book-summary__thumb {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
    background: #f0f0f1;
}

.twnc-book-summary__name {
    margin: 0 0 4px;
    font-size: 15px;
    line-height: 1.35;
}

.twnc-book-summary__rating {
    font-size: 13px;
    color: #50575e;
}

.twnc-book-summary__facts {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    color: #3c434a;
}

.twnc-book-summary__facts li {
    padding-left: 18px;
    position: relative;
}

.twnc-book-summary__facts li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c3c4c7;
}

.twnc-book-trust .twnc-trust-row {
    color: #1d2327;
}

.twnc-book-summary__total {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f6f7f7;
}

.twnc-book-summary__total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    font-size: 15px;
}

.twnc-book-summary__total-row strong {
    font-size: 20px;
    letter-spacing: -0.02em;
}

.twnc-book-summary__taxes {
    margin-top: 4px;
    text-align: right;
    font-size: 12px;
    color: #0a7d43;
}

.twnc-lead-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: #50575e;
    margin: 0 0 12px;
}

.twnc-lead-row .otsi-login-button {
    background: none;
    border: 0;
    padding: 0;
    color: #0a7d43;
    font-weight: 600;
    cursor: pointer;
    font-size: 13px;
}

.tripways-book-footer {
    max-width: 1120px;
    margin: 0 auto 28px;
    padding: 0 20px;
    font-size: 12px;
    color: #646970;
    text-align: center;
}

.tripways-book-footer a {
    color: #50575e;
}

.twnc-confirmed.twnc-step-box {
    text-align: center;
    padding: 28px 20px;
}

@media (max-width: 860px) {
    .tripways-book-header__inner {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 10px 16px;
        gap: 8px 12px;
    }
    .tripways-book-steps {
        justify-self: stretch;
    }
    .twnc-book {
        grid-template-columns: 1fr;
    }
    .twnc-book-rail {
        order: -1;
        position: static;
    }
    .twnc-fields-grid {
        grid-template-columns: 1fr;
    }
    body.admin-bar .twnc-book-rail,
    .twnc-book-rail {
        top: auto;
    }
    .twnc-step-box,
    body.admin-bar .twnc-step-box {
        scroll-margin-top: 72px;
    }
}

@media (max-width: 520px) {
    .tripways-book-steps {
        width: min(100%, 280px);
    }
    .tripways-book-step__label {
        font-size: 11px;
    }
}

/* Floating mini-cart (tour pages only; /book/ uses the order summary). */
.twnc-minicart {
    position: fixed;
    z-index: 99990;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: var(--twnc-minicart-bottom, calc(16px + env(safe-area-inset-bottom, 0px)));
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
    max-width: min(360px, calc(100vw - 32px));
    font-size: 14px;
    line-height: 1.45;
    color: #1d2327;
    transition: transform 0.22s ease, visibility 0.22s ease, opacity 0.22s ease;
}

@media (min-width: 981px) {
    .twnc-minicart {
        right: auto;
        left: max(16px, env(safe-area-inset-left, 0px));
        align-items: flex-start;
        bottom: max(24px, env(safe-area-inset-bottom, 0px));
    }
}

.twnc-minicart.twnc-minicart--rail-in-view {
    transform: translateY(calc(100% + 24px));
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

.twnc-minicart__chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 10px 14px;
    border: 0;
    border-radius: 999px;
    background: #0a7d43;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.twnc-minicart__chip:hover {
    background: #086637;
}

.twnc-minicart__icon {
    flex: 0 0 auto;
}

.twnc-minicart__panel {
    position: relative;
    width: 320px;
    max-width: 100%;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 16px 16px 14px;
    box-sizing: border-box;
}

.twnc-minicart__discard {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #646970;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.twnc-minicart__discard:hover {
    background: #f0f0f1;
    color: #1d2327;
}

.twnc-minicart__body {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding-right: 24px;
    margin-bottom: 12px;
}

.twnc-minicart__thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
    flex: 0 0 auto;
    background: #f0f0f1;
}

.twnc-minicart__copy {
    min-width: 0;
    flex: 1 1 auto;
}

.twnc-minicart__title {
    font-weight: 600;
    font-size: 14px;
    margin: 0 0 4px;
}

.twnc-minicart__meta {
    font-size: 13px;
    color: #646970;
}

.twnc-minicart__total {
    margin-top: 6px;
    font-weight: 700;
    font-size: 16px;
}

.twnc-minicart__resume {
    margin-top: 0;
}

.twnc-expired-box {
    padding: 28px 20px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #dcdcde;
    text-align: center;
}

.twnc-expired-box h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.twnc-expired-box p {
    margin: 0 0 16px;
    color: #646970;
}

.twnc-expired-box .twnc-btn {
    max-width: 280px;
}
