/*
 * TraveNexus ClientSites: the shared base.
 *
 * 1. Design tokens. Every colour, radius and font a component uses is a --tn-*
 *    variable. A client's theme (/themes/<Theme>.css in the site) sets them; these
 *    are neutral defaults so an unthemed site still looks finished.
 * 2. Bootstrap 5.3 is pointed at the tokens, so its buttons, forms and links
 *    follow the theme without a Sass build.
 * 3. Building blocks shared by several components. Styles that belong to one
 *    design of one component live beside that design (Default.cshtml.css) instead.
 */

:root {
    --tn-primary: #1f3a68;
    --tn-primary-rgb: 31, 58, 104;
    --tn-primary-dark: #152a4d;
    --tn-primary-contrast: #ffffff;
    --tn-primary-soft: #e8eef8;

    --tn-secondary: #13857c;
    --tn-secondary-text: #0f6b64;
    --tn-secondary-soft: #e3f4f2;

    --tn-accent: #e0661b;
    --tn-accent-text: #a64600;
    --tn-accent-soft: #fdf0e6;

    --tn-cta-bg: #e0661b;
    --tn-cta-bg-hover: #c95713;
    --tn-cta-text: #ffffff;

    --tn-text: #1c2434;
    --tn-muted: #5a6478;
    --tn-surface: #ffffff;
    --tn-surface-alt: #f4f6fa;
    --tn-page: #f6f8fb;
    --tn-border: #e1e6ee;
    --tn-border-strong: #c7cfdb;
    --tn-focus: rgba(var(--tn-primary-rgb), .45);
    --tn-star: #f5a524;

    --tn-hero-bg: linear-gradient(135deg, var(--tn-primary) 0%, var(--tn-primary-dark) 100%);
    --tn-hero-text: #ffffff;
    --tn-footer-bg: var(--tn-primary-dark);
    --tn-footer-text: rgba(255, 255, 255, .82);
    --tn-placeholder-bg: linear-gradient(135deg, var(--tn-primary) 0%, var(--tn-secondary) 100%);

    --tn-tone-primary: linear-gradient(135deg, var(--tn-primary) 0%, var(--tn-primary-dark) 100%);
    --tn-tone-secondary: linear-gradient(135deg, #13857c 0%, #0c5f58 100%);
    --tn-tone-accent: linear-gradient(135deg, #c95713 0%, #a64600 100%);

    --tn-font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --tn-font-heading: var(--tn-font-body);

    --tn-radius-sm: .55rem;
    --tn-radius: .85rem;
    --tn-radius-lg: 1.15rem;
    --tn-shadow-sm: 0 1px 2px rgba(16, 24, 40, .06);
    --tn-shadow: 0 4px 14px rgba(16, 24, 40, .08);
    --tn-shadow-lg: 0 18px 40px rgba(16, 24, 40, .14);

    /* Bootstrap follows the tokens. */
    --bs-primary: var(--tn-primary);
    --bs-primary-rgb: var(--tn-primary-rgb);
    --bs-body-font-family: var(--tn-font-body);
    --bs-body-color: var(--tn-text);
    --bs-body-bg: var(--tn-page);
    --bs-secondary-color: var(--tn-muted);
    --bs-border-color: var(--tn-border);
    --bs-link-color: var(--tn-primary);
    --bs-link-color-rgb: var(--tn-primary-rgb);
    --bs-link-hover-color: var(--tn-primary-dark);
    --bs-border-radius: var(--tn-radius-sm);
    --bs-border-radius-lg: var(--tn-radius);
    --bs-focus-ring-color: var(--tn-focus);
}

/* ------------------------------------------------------------ base */

html {
    -webkit-text-size-adjust: 100%;
    /* Anything scrolled to (a link target, a field with an error) stops below the sticky header. */
    scroll-padding-top: 5.5rem;
}

body.tn-body {
    background: var(--tn-page);
    color: var(--tn-text);
    font-family: var(--tn-font-body);
    overflow-x: hidden;
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--tn-font-heading);
    color: var(--tn-text);
}

a {
    text-underline-offset: .15em;
}

:focus-visible {
    outline: 3px solid var(--tn-focus);
    outline-offset: 2px;
}

.tn-main {
    min-height: 50vh;
    outline: none;
}

.tn-skip {
    position: absolute;
    left: 1rem;
    top: .5rem;
    z-index: 2000;
    padding: .6rem 1rem;
    background: var(--tn-surface);
    border-radius: var(--tn-radius-sm);
    box-shadow: var(--tn-shadow);
}

.tn-demo-bar {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: .5rem;
    padding: .45rem 1rem;
    background: var(--tn-accent-soft);
    color: var(--tn-accent-text);
    font-size: .85rem;
    text-align: center;
}

/* ------------------------------------------------------------ Bootstrap, themed */

.btn-primary {
    --bs-btn-bg: var(--tn-primary);
    --bs-btn-border-color: var(--tn-primary);
    --bs-btn-color: var(--tn-primary-contrast);
    --bs-btn-hover-bg: var(--tn-primary-dark);
    --bs-btn-hover-border-color: var(--tn-primary-dark);
    --bs-btn-hover-color: var(--tn-primary-contrast);
    --bs-btn-active-bg: var(--tn-primary-dark);
    --bs-btn-active-border-color: var(--tn-primary-dark);
    --bs-btn-disabled-bg: var(--tn-primary);
    --bs-btn-disabled-border-color: var(--tn-primary);
    --bs-btn-focus-shadow-rgb: var(--tn-primary-rgb);
}

.btn-outline-primary {
    --bs-btn-color: var(--tn-primary);
    --bs-btn-border-color: var(--tn-primary);
    --bs-btn-hover-bg: var(--tn-primary);
    --bs-btn-hover-border-color: var(--tn-primary);
    --bs-btn-hover-color: var(--tn-primary-contrast);
    --bs-btn-active-bg: var(--tn-primary-dark);
    --bs-btn-active-border-color: var(--tn-primary-dark);
    --bs-btn-focus-shadow-rgb: var(--tn-primary-rgb);
}

.btn-link {
    --bs-btn-color: var(--tn-primary);
    --bs-btn-hover-color: var(--tn-primary-dark);
}

/* The call to action: Search, Book. Its colours come from the theme so a theme
   can keep the text readable on its own brand colour. */
.btn-cta {
    --bs-btn-bg: var(--tn-cta-bg);
    --bs-btn-border-color: var(--tn-cta-bg);
    --bs-btn-color: var(--tn-cta-text);
    --bs-btn-hover-bg: var(--tn-cta-bg-hover);
    --bs-btn-hover-border-color: var(--tn-cta-bg-hover);
    --bs-btn-hover-color: var(--tn-cta-text);
    --bs-btn-active-bg: var(--tn-cta-bg-hover);
    --bs-btn-active-border-color: var(--tn-cta-bg-hover);
    --bs-btn-active-color: var(--tn-cta-text);
    --bs-btn-disabled-bg: var(--tn-cta-bg);
    --bs-btn-disabled-border-color: var(--tn-cta-bg);
    --bs-btn-disabled-color: var(--tn-cta-text);
    --bs-btn-font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.btn {
    border-radius: var(--tn-radius-sm);
}

.form-control,
.form-select {
    min-height: 44px;
    border-color: var(--tn-border-strong);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--tn-primary);
    box-shadow: 0 0 0 .2rem var(--tn-focus);
}

.form-check-input:checked {
    background-color: var(--tn-primary);
    border-color: var(--tn-primary);
}

.form-range::-webkit-slider-thumb {
    background: var(--tn-primary);
}

.form-range::-moz-range-thumb {
    background: var(--tn-primary);
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 .2rem var(--tn-focus);
}

.form-control.input-validation-error,
.form-select.input-validation-error {
    border-color: var(--bs-form-invalid-border-color);
}

.field-validation-valid {
    display: none !important;
}

.accordion {
    --bs-accordion-active-color: var(--tn-primary);
    --bs-accordion-active-bg: var(--tn-primary-soft);
    --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem var(--tn-focus);
    --bs-accordion-border-radius: var(--tn-radius);
    --bs-accordion-inner-border-radius: var(--tn-radius);
}

.accordion-button {
    font-weight: 600;
}

.dropdown-menu {
    --bs-dropdown-bg: var(--tn-surface);
    --bs-dropdown-link-active-bg: var(--tn-primary);
}

.offcanvas,
.offcanvas-lg {
    --bs-offcanvas-bg: var(--tn-surface);
}

.offcanvas-footer {
    padding: 1rem;
    border-top: 1px solid var(--tn-border);
}

/* ------------------------------------------------------------ building blocks */

.tn-hint {
    color: var(--tn-muted);
    font-size: .875rem;
}

.tn-price {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--tn-text);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.tn-price-sm {
    font-size: 1.1rem;
}

.tn-card {
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
    border-radius: var(--tn-radius);
    box-shadow: var(--tn-shadow-sm);
    padding: 1.25rem;
}

.tn-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: .5rem;
}

.tn-badge {
    display: inline-flex;
    align-items: center;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: var(--tn-secondary-soft);
    color: var(--tn-secondary-text);
    font-size: .8rem;
    font-weight: 600;
    white-space: nowrap;
}

.tn-pill {
    display: inline-block;
    padding: .15rem .6rem;
    border-radius: 999px;
    background: var(--tn-primary);
    color: var(--tn-primary-contrast);
    font-size: .75rem;
    font-weight: 600;
}

.tn-stars {
    color: var(--tn-star);
    font-size: .8rem;
    display: flex;
    gap: .1rem;
    margin-bottom: .25rem;
}

.tn-airline-mark {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .85rem;
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
}

.tn-tone-primary {
    background: var(--tn-tone-primary);
}

.tn-tone-secondary {
    background: var(--tn-tone-secondary);
}

.tn-tone-accent {
    background: var(--tn-tone-accent);
}

.tn-segmented {
    display: flex;
    gap: .5rem;
}

.tn-segmented .btn {
    flex: 1;
    border: 1px solid var(--tn-border-strong);
    background: var(--tn-surface);
    min-height: 44px;
}

.tn-segmented .btn-check:checked + .btn {
    background: var(--tn-primary-soft);
    border-color: var(--tn-primary);
    color: var(--tn-primary);
    font-weight: 600;
}

.tn-toggle {
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    padding: .35rem .5rem;
    min-height: 40px;
}

.tn-toggle .bi {
    display: inline-block;
    transition: transform .2s ease;
}

.tn-toggle[aria-expanded="true"] .bi {
    transform: rotate(180deg);
}

.tn-narrow {
    max-width: 36rem;
    padding-top: 2rem;
}

/* ------------------------------------------------------------ page structure */

.tn-hero {
    position: relative;
    background: var(--tn-hero-bg);
    color: var(--tn-hero-text);
    padding: 2.25rem 0 2.5rem;
    overflow: hidden;
}

.tn-hero > .container {
    position: relative;
}

.tn-hero-title {
    color: inherit;
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: .5rem;
}

.tn-hero-sub {
    font-size: clamp(1rem, 2.4vw, 1.2rem);
    opacity: .9;
    margin-bottom: 1.5rem;
    max-width: 40rem;
}

.tn-hero-compact {
    padding-bottom: 3rem;
}

.tn-search-card {
    position: relative;
    z-index: 5;
    background: var(--tn-surface);
    color: var(--tn-text);
    border-radius: var(--tn-radius-lg);
    box-shadow: var(--tn-shadow-lg);
    padding: 1.25rem;
}

.tn-section {
    padding: 2.75rem 0;
}

.tn-section-alt {
    background: var(--tn-surface);
}

.tn-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .5rem 1rem;
    margin-bottom: 1.5rem;
}

.tn-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--tn-accent-text);
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-bottom: .35rem;
}

.tn-eyebrow::before {
    content: "";
    width: 1.5rem;
    height: 3px;
    border-radius: 3px;
    background: var(--tn-accent);
}

.tn-section-title {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    font-weight: 700;
    margin: 0;
}

.tn-section-sub {
    color: var(--tn-muted);
    margin: .35rem 0 0;
    max-width: 40rem;
}

.tn-page-head {
    background: var(--tn-surface);
    border-bottom: 1px solid var(--tn-border);
    padding: 1.25rem 0;
    margin-bottom: 1.5rem;
}

.tn-page-title {
    font-size: clamp(1.4rem, 3.5vw, 1.9rem);
    font-weight: 700;
    margin: 0;
}

.tn-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1.25rem;
    list-style: none;
    padding: 0;
    margin: 0 0 .75rem;
    font-size: .875rem;
    color: var(--tn-muted);
}

.tn-steps li {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.tn-steps span {
    display: inline-grid;
    place-items: center;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    border: 1px solid var(--tn-border-strong);
    font-size: .75rem;
}

.tn-steps .is-done {
    color: var(--tn-secondary-text);
}

.tn-steps .is-current {
    color: var(--tn-primary);
    font-weight: 600;
}

.tn-steps .is-current span {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: var(--tn-primary-contrast);
}

.tn-empty {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
    border-radius: var(--tn-radius);
}

.tn-empty > .bi {
    font-size: 2.5rem;
    color: var(--tn-accent);
}

.tn-empty h1,
.tn-empty h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: .75rem 0 .5rem;
}

.tn-empty p {
    color: var(--tn-muted);
    max-width: 30rem;
    margin: 0 auto 1rem;
}

.tn-confirm {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.tn-confirm-icon {
    font-size: 2.5rem;
    line-height: 1;
}

.tn-confirm.is-ok .tn-confirm-icon {
    color: var(--tn-secondary);
}

.tn-confirm.is-wait .tn-confirm-icon {
    color: var(--tn-accent);
}

.tn-ref {
    font-size: 1.15rem;
    letter-spacing: .04em;
}

.tn-people {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tn-people li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    padding: .5rem 0;
    border-bottom: 1px solid var(--tn-border);
}

/* ------------------------------------------------------------ search fields */

.tn-field {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tn-label {
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--tn-muted);
    margin-bottom: .3rem;
}

.tn-input {
    width: 100%;
    min-height: 56px;
    padding: .6rem .9rem;
    border: 1px solid var(--tn-border-strong);
    border-radius: var(--tn-radius-sm);
    background: var(--tn-surface);
    color: var(--tn-text);
    font-size: 1rem;
    font-weight: 600;
    appearance: none;
}

.tn-input::placeholder {
    color: var(--tn-muted);
    font-weight: 400;
}

.tn-input:focus {
    outline: none;
    border-color: var(--tn-primary);
    box-shadow: 0 0 0 .2rem var(--tn-focus);
}

.tn-input[type="date"] {
    min-width: 0;
    padding-left: .75rem;
    padding-right: .5rem;
}

/* Phones open their own date picker on a tap; the desktop calendar button only takes room. */
@media (pointer: coarse) {
    .tn-input[type="date"]::-webkit-calendar-picker-indicator {
        display: none;
    }
}

@media (max-width: 374.98px) {
    .tn-input {
        font-size: .95rem;
    }
}

.tn-input[type="date"]::-webkit-date-and-time-value {
    text-align: left;
}

.tn-field.is-invalid .tn-input {
    border-color: var(--bs-form-invalid-border-color);
}

.tn-field-error {
    color: var(--bs-form-invalid-color);
    font-size: .82rem;
    margin-top: .25rem;
}

/* ------------------------------------------------------------ place picker (airports and cities) */

.tn-place-button {
    cursor: pointer;
    caret-color: transparent;
    text-overflow: ellipsis;
}

.tn-picker {
    position: absolute;
    z-index: 1060;
    width: 26rem;
    max-width: calc(100vw - 2rem);
    display: flex;
    flex-direction: column;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
    border-radius: var(--tn-radius);
    box-shadow: var(--tn-shadow-lg);
    overflow: hidden;
}

.tn-picker[hidden] {
    display: none;
}

.tn-picker-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    border-bottom: 1px solid var(--tn-border);
    box-shadow: 0 2px 6px rgba(16, 24, 40, .05);
}

.tn-picker-glass {
    color: var(--tn-text);
    font-size: 1.05rem;
}

.tn-picker-input {
    flex: 1;
    min-width: 0;
    padding: .55rem 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--tn-text);
    font-size: 1.15rem;
    font-weight: 700;
}

.tn-picker-input::placeholder {
    color: var(--tn-muted);
    font-weight: 400;
    font-size: 1rem;
}

.tn-picker-back,
.tn-picker-clear,
.tn-cal-back {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tn-muted);
}

.tn-picker-back:hover,
.tn-picker-clear:hover,
.tn-cal-back:hover {
    background: var(--tn-surface-alt);
    color: var(--tn-text);
}

.tn-picker-back,
.tn-cal-back {
    display: none;
    color: var(--tn-text);
    font-size: 1.2rem;
}

.tn-picker-clear[hidden] {
    display: none;
}

.tn-suggest {
    margin: 0;
    padding: .25rem .5rem .6rem;
    list-style: none;
    max-height: 24rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.tn-suggest .tn-suggest-head {
    padding: .75rem .55rem .4rem;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--tn-muted);
    cursor: default;
}

.tn-suggest [role="option"] {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .5rem .55rem;
    border-radius: .6rem;
    cursor: pointer;
}

.tn-suggest [role="option"][aria-selected="true"],
.tn-suggest [role="option"]:hover {
    background: var(--tn-primary-soft);
}

.tn-suggest .tn-code {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 2.85rem;
    border: 1px solid var(--tn-border);
    border-radius: .65rem;
    background: var(--tn-surface-alt);
    color: var(--tn-text);
    font-size: .9rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.tn-suggest .tn-suggest-group .tn-code {
    border-color: transparent;
    background: var(--tn-primary);
    color: var(--tn-primary-contrast);
}

.tn-suggest .tn-suggest-under {
    padding-left: .4rem;
}

.tn-suggest .tn-elbow {
    flex: none;
    margin-left: .65rem;
    margin-right: -.3rem;
    color: var(--tn-border-strong);
    font-size: 1.1rem;
}

.tn-suggest .tn-suggest-under .tn-code {
    width: 3rem;
    height: 2.6rem;
}

.tn-suggest .tn-place-body {
    min-width: 0;
}

.tn-suggest .tn-place-name {
    display: block;
    font-weight: 500;
    color: var(--tn-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tn-suggest .tn-place-name b,
.tn-suggest .tn-place-sub b {
    font-weight: 800;
}

.tn-suggest .tn-place-sub {
    display: block;
    font-size: .82rem;
    color: var(--tn-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tn-suggest .tn-suggest-empty {
    padding: 1rem .55rem;
    color: var(--tn-muted);
    cursor: default;
}

/* ------------------------------------------------------------ calendar */

.tn-has-cal .tn-dates,
.tn-has-cal .tn-hdates {
    position: relative;
}

.tn-date-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-align: left;
    line-height: 1.2;
    cursor: pointer;
}

.tn-date-main {
    font-weight: 700;
    white-space: nowrap;
}

.tn-date-sub {
    font-size: .78rem;
    font-weight: 500;
    color: var(--tn-muted);
    white-space: nowrap;
}

.tn-date-sub:empty {
    display: none;
}

.tn-date-btn.is-empty .tn-date-main {
    color: var(--tn-muted);
    font-weight: 500;
}

.tn-return .tn-date-btn.is-empty .tn-date-main {
    color: var(--tn-primary);
    font-weight: 600;
}

.tn-return .tn-date-btn.is-empty .tn-date-main::before {
    content: "+ ";
}

.tn-cal {
    position: absolute;
    z-index: 1060;
    width: 46rem;
    max-width: calc(100vw - 2rem);
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
    border-radius: var(--tn-radius);
    box-shadow: var(--tn-shadow-lg);
}

.tn-cal[hidden] {
    display: none;
}

.tn-cal-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1rem;
    border-bottom: 1px solid var(--tn-border);
}

.tn-cal-slots {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .6rem;
    max-width: 26rem;
}

.tn-cal-slot {
    padding: .45rem .8rem;
    border: 1px solid var(--tn-border-strong);
    border-radius: var(--tn-radius-sm);
    background: var(--tn-surface);
    text-align: left;
    color: var(--tn-text);
}

.tn-cal-slot.is-active {
    border-color: var(--tn-primary);
    box-shadow: 0 0 0 .18rem var(--tn-focus);
}

.tn-cal-slot-label {
    display: block;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--tn-muted);
}

.tn-cal-slot-value {
    display: block;
    font-weight: 700;
}

.tn-cal-slot.is-empty .tn-cal-slot-value {
    color: var(--tn-primary);
}

.tn-cal:not(.is-ranged) .tn-cal-slot[data-slot="end"]:not(.is-empty) {
    display: none;
}

.tn-cal-body {
    position: relative;
    padding: .75rem 1.25rem .5rem;
}

.tn-cal-months {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.25rem;
}

.tn-cal-move {
    position: absolute;
    top: .8rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--tn-primary);
    font-size: 1.1rem;
}

.tn-cal-move:hover:not(:disabled) {
    background: var(--tn-primary-soft);
}

.tn-cal-move:disabled {
    opacity: .25;
}

.tn-cal-prev {
    left: .9rem;
}

.tn-cal-next {
    right: .9rem;
}

.tn-cal-title {
    padding: .4rem 0 .7rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
}

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

.tn-cal-dow {
    padding-bottom: .4rem;
    text-align: center;
    font-size: .75rem;
    font-weight: 600;
    color: var(--tn-muted);
}

.tn-cal-day {
    height: 2.6rem;
    border: 0;
    border-radius: .55rem;
    background: transparent;
    color: var(--tn-text);
    font-size: .95rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.tn-cal-day:hover:not([aria-disabled="true"]) {
    background: var(--tn-primary-soft);
}

.tn-cal-day[aria-disabled="true"] {
    color: var(--tn-muted);
    opacity: .4;
    cursor: default;
}

.tn-cal-day.is-today {
    font-weight: 800;
    box-shadow: inset 0 0 0 1px var(--tn-border-strong);
}

.tn-cal-day.in-range,
.tn-cal-day.in-range:hover {
    border-radius: 0;
    background: var(--tn-primary-soft);
}

.tn-cal-day.is-start,
.tn-cal-day.is-end,
.tn-cal-day.is-start:hover,
.tn-cal-day.is-end:hover {
    background: var(--tn-primary);
    color: var(--tn-primary-contrast);
    font-weight: 700;
    box-shadow: none;
}

.tn-cal-day:focus-visible {
    outline: 3px solid var(--tn-focus);
    outline-offset: 1px;
}

.tn-cal-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .65rem 1.25rem .85rem;
    border-top: 1px solid var(--tn-border);
}

.tn-cal-hint {
    color: var(--tn-muted);
    font-size: .9rem;
}

/* ------------------------------------------------------------ phones: both open as a full screen */

html.tn-sheet-open,
html.tn-sheet-open body {
    overflow: hidden;
}

@media (max-width: 767.98px) {
    .tn-picker,
    .tn-cal {
        position: fixed;
        inset: 0;
        z-index: 1080;
        width: auto;
        max-width: none;
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .tn-picker-back,
    .tn-cal-back {
        display: inline-flex;
    }

    .tn-picker-glass,
    .tn-cal-move {
        display: none;
    }

    .tn-picker .tn-suggest {
        flex: 1;
        max-height: none;
    }

    .tn-cal-head {
        padding: .6rem .75rem;
    }

    .tn-cal-slots {
        max-width: none;
    }

    .tn-cal-body {
        flex: 1;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: .5rem 1rem 1rem;
    }

    .tn-cal-months {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .tn-cal-title {
        text-align: left;
    }

    .tn-cal-day {
        height: auto;
        aspect-ratio: 1 / 1;
        max-height: 3rem;
    }

    .tn-cal-foot .tn-cal-done {
        min-width: 8rem;
    }
}

.tn-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .55rem 0;
}

.tn-stepper-controls {
    display: flex;
    align-items: center;
    gap: .6rem;
}

.tn-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--tn-border-strong);
    background: var(--tn-surface);
    color: var(--tn-primary);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
}

.tn-step:disabled {
    opacity: .35;
}

.tn-step-value {
    min-width: 1.5rem;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.tn-room {
    border-bottom: 1px solid var(--tn-border);
    padding-bottom: .5rem;
    margin-bottom: .5rem;
}

.tn-room-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    padding-top: .25rem;
}

.tn-room-ages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(6.5rem, 1fr));
    gap: .5rem;
    margin-top: .25rem;
}

.tn-room-ages label {
    font-size: .78rem;
    color: var(--tn-muted);
}

.tn-form-alert {
    margin-bottom: 1rem;
}

.tn-recent {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    margin-top: 1rem;
}

.tn-recent[hidden] {
    display: none;
}

.tn-recent-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.tn-recent-list a {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: var(--tn-surface-alt);
    border: 1px solid var(--tn-border);
    color: var(--tn-text);
    text-decoration: none;
    font-size: .85rem;
}

.tn-recent-list a:hover {
    border-color: var(--tn-primary);
}

/* ------------------------------------------------------------ results */

.tn-results-page {
    padding-top: 1.25rem;
}

.tn-day-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: 1rem;
}

.tn-results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

.tn-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1rem;
}

.tn-toolbar-actions {
    display: flex;
    gap: .5rem;
    flex: 1 1 auto;
    justify-content: flex-end;
}

.tn-count {
    margin: 0;
    line-height: 1.3;
    font-weight: 700;
    font-size: 1.05rem;
}

.tn-sort {
    width: auto;
    min-width: 12rem;
}

.tn-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 44px;
}

.tn-result-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.tn-result[hidden] {
    display: none;
}

@media (max-width: 575.98px) {
    .tn-toolbar-actions {
        width: 100%;
    }

    .tn-filter-btn,
    .tn-sort {
        flex: 1 1 0;
        min-width: 0;
    }
}

@media (min-width: 992px) {
    .tn-results-grid {
        grid-template-columns: 17.5rem 1fr;
    }

    .tn-filters-panel {
        position: sticky;
        top: 88px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
        background: var(--tn-surface);
        border: 1px solid var(--tn-border);
        border-radius: var(--tn-radius);
        padding: 1.1rem;
    }
}

@media (min-width: 768px) {
    .tn-search-card {
        padding: 1.5rem 1.75rem 1.75rem;
    }

    .tn-hero {
        padding: 3rem 0 3.5rem;
    }
}

@media print {
    .tn-header,
    .tn-footer,
    .tn-demo-bar,
    .d-print-none {
        display: none !important;
    }

    body.tn-body {
        background: #fff;
    }

    .tn-card {
        box-shadow: none;
        break-inside: avoid;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ------------------------------------------------------------ filters (results pages) */

.tn-filters {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.tn-filter-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tn-filter {
    border-top: 1px solid var(--tn-border);
    padding-top: 1rem;
}

.tn-filter legend {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: .6rem;
}

.tn-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .5rem;
}

.tn-chip,
.tn-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .1rem;
    text-align: center;
    padding: .55rem .35rem;
    border: 1px solid var(--tn-border);
    border-radius: var(--tn-radius-sm);
    background: var(--tn-surface);
    cursor: pointer;
    font-size: .875rem;
    min-height: 44px;
    line-height: 1.2;
}

.tn-chip small,
.tn-slot small {
    color: var(--tn-muted);
    font-size: .75rem;
}

.tn-slots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
}

.tn-slot .bi {
    font-size: 1.2rem;
    color: var(--tn-accent);
}

.btn-check:checked + .tn-chip,
.btn-check:checked + .tn-slot {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    box-shadow: inset 0 0 0 1px var(--tn-primary);
}

.btn-check:focus-visible + .tn-chip,
.btn-check:focus-visible + .tn-slot {
    outline: 3px solid var(--tn-focus);
    outline-offset: 2px;
}

.btn-check:disabled + .tn-slot {
    opacity: .45;
    cursor: not-allowed;
}

.tn-airline-check {
    padding-top: .3rem;
    padding-bottom: .3rem;
}

.tn-airline-check .form-check-label {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: .5rem;
}

.tn-airline-check small {
    color: var(--tn-muted);
}

/* ------------------------------------------------------------ search summary bar (results pages) */

.tn-modify {
    background: var(--tn-hero-bg);
    color: var(--tn-hero-text);
    padding: 1.25rem 0;
}

.tn-modify-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.tn-modify-route {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
    font-size: clamp(1.2rem, 3.5vw, 1.6rem);
    font-weight: 700;
    margin: 0;
    color: inherit;
}

.tn-modify-route .bi {
    color: var(--tn-accent);
}

.tn-modify-facts {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem 1rem;
    margin: .35rem 0 0;
    opacity: .9;
}

.tn-modify-facts span + span::before {
    content: "·";
    margin-right: 1rem;
    opacity: .6;
}

.tn-modify-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, .35);
    font-weight: 600;
    min-height: 44px;
}

.tn-modify-btn:hover,
.tn-modify-btn:focus-visible {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.tn-modify-card {
    position: relative;
    z-index: 5;
    margin-top: 1rem;
    padding: 1.25rem;
    background: var(--tn-surface);
    color: var(--tn-text);
    border-radius: var(--tn-radius-lg);
    box-shadow: var(--tn-shadow-lg);
}

@media (max-width: 575.98px) {
    .tn-modify-btn {
        width: 100%;
        justify-content: center;
    }
}
