/* ==========================================================================
   TravelOptions — live deals
   Fare cards (live Amadeus flight prices), car cards (live airport transfer
   offers), the promo-code strip and the discount badge, on the homepage and
   the Flights page; the fare labels are also used on flight results.
   Loaded after site.css, whose tokens (--to-*, --s*, --r-*, --sh-*) it uses.
   ========================================================================== */

/* ---------- Group switch (Local / International) ---------- */
.dl-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); flex-wrap: wrap; margin-bottom: var(--s5); }
.dl-head .to-section__head { margin: 0; flex: 1 1 320px; }
.dl-switch { display: inline-flex; gap: 2px; padding: 4px; border-radius: var(--r-pill); background: var(--to-card); box-shadow: var(--sh-1); }
.dl-switch button {
    display: inline-flex; align-items: center; gap: 6px;
    min-height: 40px; padding: 0 var(--s4); border: 0; border-radius: var(--r-pill); background: transparent;
    color: var(--to-muted); font: 700 14px/1 var(--to-font); cursor: pointer; white-space: nowrap;
    transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.dl-switch button:hover { color: var(--to-ink); }
.dl-switch button:active { transform: scale(.96); }
.dl-switch button[aria-selected="true"] { background: var(--to-ink); color: var(--to-on-ink); }
.dl-switch button:focus-visible { outline: 2px solid var(--to-brand); outline-offset: 2px; }
.dl-panel[hidden] { display: none; }
.dl-panel.is-entering .dl-fare { animation: dlRise 420ms var(--ease-out) backwards; }
.dl-panel.is-entering .dl-fare:nth-child(2) { animation-delay: 40ms; }
.dl-panel.is-entering .dl-fare:nth-child(3) { animation-delay: 80ms; }
.dl-panel.is-entering .dl-fare:nth-child(4) { animation-delay: 120ms; }
@keyframes dlRise { from { opacity: 0; transform: translate3d(0, 10px, 0); } }

.dl-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); flex-wrap: wrap; margin-top: var(--s2); color: var(--to-muted); font-size: 13px; }
.dl-foot__live { display: inline-flex; align-items: center; gap: 8px; }
.dl-foot__live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; box-shadow: 0 0 0 4px rgba(31, 157, 85, .15); }

/* ---------- Fare card ---------- */
.dl-fare {
    position: relative; display: flex; flex-direction: column; height: 100%;
    background: var(--to-card); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1);
    color: inherit; text-decoration: none;
    transition: transform 380ms var(--ease-out), box-shadow 380ms var(--ease-out);
}
.dl-fare:hover { transform: translateY(-4px); box-shadow: var(--sh-3); color: inherit; }
.dl-fare:active { transform: translateY(-2px) scale(.99); }
.dl-fare:focus-visible { outline: 2px solid var(--to-brand); outline-offset: 3px; }
.dl-fare__media { position: relative; aspect-ratio: 16 / 10; margin: 8px 8px 0; border-radius: 12px; overflow: hidden; background: var(--to-surface); }
.dl-fare__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.dl-fare:hover .dl-fare__media img { transform: scale(1.06); }
.dl-fare__media::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(180deg, transparent, rgba(10, 10, 14, .72)); pointer-events: none; }
.dl-fare__codes {
    position: absolute; top: 10px; left: 10px; z-index: 1;
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-pill);
    background: var(--to-glass); color: var(--to-ink); font: 800 12px/1 var(--to-font); letter-spacing: .04em;
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.dl-fare__codes svg { color: var(--to-brand); }
.dl-fare__city { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; color: #fff; }
.dl-fare__city b { display: block; font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.dl-fare__city span { font-size: 13px; opacity: .88; }
.dl-fare__body { display: flex; flex-direction: column; gap: var(--s2); padding: var(--s3) var(--s4) var(--s4); flex: 1; }
.dl-fare__air { display: flex; align-items: center; gap: var(--s2); min-width: 0; color: var(--to-ink-2); font-size: 13px; }
.dl-fare__logo { flex: none; width: 46px; height: 20px; object-fit: contain; object-position: left center; }
.dl-fare__air span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-fare__air b { color: var(--to-ink); font-weight: 700; }
.dl-fare__foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s3); margin-top: auto; padding-top: var(--s2); }
.dl-fare__price { display: grid; gap: 2px; }
.dl-fare__price small { color: var(--to-muted); font-size: 12px; font-weight: 600; }
.dl-fare__price b { color: var(--to-ink); font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dl-fare__price del { color: var(--to-muted); font-size: 12.5px; font-weight: 500; }
.dl-fare__date { flex: none; color: var(--to-muted); font-size: 12.5px; font-weight: 600; text-align: right; }
.dl-fare__go {
    display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
    background: var(--to-surface); color: var(--to-ink);
    transition: background-color var(--t-base) var(--ease-out), color var(--t-base) var(--ease-out), transform var(--t-base) var(--ease-out);
}
.dl-fare:hover .dl-fare__go { background: var(--to-brand); color: #fff; transform: translateX(2px); }

/* ---------- Labels (fare facts) ---------- */
.dl-labels { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-label {
    display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 0 8px; border-radius: 6px;
    background: var(--to-surface); color: var(--to-ink-2); font: 600 12px/1 var(--to-font); white-space: nowrap;
}
.dl-label svg { flex: none; }
.dl-label--hot { background: var(--to-brand-tint); color: var(--to-brand-ink); }
.dl-label--ok { background: var(--to-ok-bg); color: var(--to-ok); }
.dl-label--save { background: var(--to-ok-bg); color: var(--to-ok); }

/* ---------- Discount / promo badge on a photo ---------- */
.dl-tag {
    position: absolute; top: 10px; right: 10px; z-index: 1;
    display: inline-flex; align-items: center; gap: 6px; max-width: calc(100% - 20px);
    padding: 5px 10px; border-radius: var(--r-pill);
    background: var(--to-brand); color: #fff; font: 800 12px/1 var(--to-font); white-space: nowrap;
    box-shadow: 0 6px 16px -6px rgba(var(--to-brand-rgb), .7);
}
.dl-tag small { font-weight: 700; opacity: .9; letter-spacing: .04em; }
.dl-tag--save { background: #147a44; box-shadow: 0 6px 16px -6px rgba(20, 122, 68, .6); }
.dl-tag--pick { left: 10px; right: auto; background: var(--to-night); box-shadow: none; }

/* ---------- Skeleton (cold cache) ---------- */
.dl-skel { pointer-events: none; }
.dl-skel .dl-fare__media, .dl-skel .dl-skel__line {
    background: linear-gradient(90deg, var(--to-surface) 0%, var(--to-surface-2) 50%, var(--to-surface) 100%);
    background-size: 200% 100%; animation: to-shimmer 1.3s ease-in-out infinite;
}
.dl-skel .dl-fare__media::after { display: none; }
.dl-skel__line { display: block; height: 14px; border-radius: 6px; }
.dl-skel__line:first-child { width: 60%; }
.dl-skel__line:nth-child(2) { width: 40%; }
.dl-skel__line:last-child { width: 50%; height: 20px; margin-top: var(--s3); }
@media (prefers-reduced-motion: reduce) {
    .dl-skel .dl-fare__media, .dl-skel .dl-skel__line { animation: none; }
    .dl-panel.is-entering .dl-fare { animation: none; }
}

/* ---------- Car card ---------- */
.dl-car .dl-fare__media { background: linear-gradient(180deg, #f6f7f9, #eceef2); }
.dl-car .dl-fare__media::after { display: none; }
.dl-car .dl-fare__media img { object-fit: contain; padding: 14px 18px 22px; mix-blend-mode: multiply; }
.dl-car:hover .dl-fare__media img { transform: scale(1.04) translateX(4px); }
.dl-car__type { position: absolute; left: 10px; bottom: 10px; z-index: 1; padding: 4px 9px; border-radius: var(--r-pill); background: var(--to-card); color: var(--to-ink); font: 700 11.5px/1 var(--to-font); box-shadow: var(--sh-1); }
.dl-car__title { margin: 0; color: var(--to-ink); font-size: 16px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; }
.dl-car__route { display: flex; align-items: flex-start; gap: 6px; color: var(--to-muted); font-size: 13px; line-height: 1.4; }
.dl-car__route svg { flex: none; margin-top: 2px; color: var(--to-brand); }
.dl-car__provider { display: inline-flex; align-items: center; gap: 6px; color: var(--to-muted); font-size: 12px; }
.dl-car__provider img { width: auto; height: 16px; max-width: 70px; object-fit: contain; }

/* ---------- Promo codes strip ---------- */
.dl-promos { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.dl-promo {
    position: relative; display: grid; grid-template-columns: 112px minmax(0, 1fr); overflow: hidden;
    border-radius: var(--r-lg); background: var(--to-card); box-shadow: var(--sh-1);
}
.dl-promo__off {
    position: relative; display: grid; place-content: center; gap: 2px; padding: var(--s4) var(--s2); text-align: center;
    background: linear-gradient(150deg, var(--to-brand), var(--to-brand-2)); color: #fff;
}
.dl-promo__off b { font-size: 26px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.dl-promo__off span { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; opacity: .9; }
/* the ticket's perforation */
.dl-promo__off::after {
    content: ""; position: absolute; top: 0; bottom: 0; right: -6px; width: 12px;
    background: radial-gradient(circle at 6px 8px, var(--to-card) 5px, transparent 5.5px) 0 0 / 12px 16px repeat-y;
}
.dl-promo__body { display: flex; flex-direction: column; gap: 6px; padding: var(--s4) var(--s4) var(--s4) var(--s5); min-width: 0; }
.dl-promo__title { margin: 0; color: var(--to-ink); font-size: 16px; font-weight: 800; letter-spacing: -.015em; line-height: 1.3; }
.dl-promo__meta { margin: 0; color: var(--to-muted); font-size: 12.5px; line-height: 1.45; }
.dl-promo__row { display: flex; align-items: center; gap: var(--s2); margin-top: auto; padding-top: 4px; }
.dl-promo__code {
    padding: 6px 10px; border-radius: 8px; border: 1.5px dashed var(--to-line-2); background: var(--to-surface-2);
    color: var(--to-ink); font: 800 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .08em;
    user-select: all;
}
.dl-promo__copy {
    display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
    background: var(--to-ink); color: var(--to-on-ink); font: 700 13px/1 var(--to-font); cursor: pointer;
    transition: background-color var(--t-fast) var(--ease-out), transform var(--t-fast) var(--ease-out);
}
.dl-promo__copy:hover { background: var(--to-ink-hover); }
.dl-promo__copy:active { transform: scale(.96); }
.dl-promo__copy:focus-visible { outline: 2px solid var(--to-brand); outline-offset: 2px; }
.dl-promo__copy.is-done { background: #147a44; }
@media (max-width: 420px) { .dl-promo { grid-template-columns: 92px minmax(0, 1fr); } .dl-promo__off b { font-size: 22px; } }
@media (pointer: coarse) { .dl-promo__copy { min-height: 44px; } .dl-switch button { min-height: 44px; } }

/* ---------- Why book with us (photo cards, /flights) ---------- */
.dl-why { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.dl-why__item { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-lg); background: var(--to-card); box-shadow: var(--sh-1); }
.dl-why__media { aspect-ratio: 16 / 10; margin: 8px 8px 0; border-radius: 12px; overflow: hidden; background: var(--to-surface); }
.dl-why__media img { width: 100%; height: 100%; object-fit: cover; }
.dl-why__body { padding: var(--s4) var(--s5) var(--s5); }
.dl-why__body h3 { margin: 0 0 6px; color: var(--to-ink); font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.dl-why__body p { margin: 0; color: var(--to-muted); font-size: 14px; line-height: 1.55; }
.to-route .dl-tag { z-index: 1; }
