/* =========================================================
   TUI Cheap Flights — live fares (TUI Flight Price Cache API)
   ========================================================= */
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(11, 73, 244, .45); } 80%, 100% { box-shadow: 0 0 0 8px rgba(11, 73, 244, 0); } }
/* Lowest fares: one photo card per destination */
.lv-from { display: flex; align-items: center; gap: 10px; }
.lv-from label { font: 600 14px var(--fh); color: var(--navy); white-space: nowrap; }
.lv-from .sel { min-width: 210px; }
#liveTypes { margin-bottom: 8px; }
.pill-n { font: 600 12px var(--fh); color: var(--g500); }
.pill[aria-selected="true"] .pill-n { color: rgba(255, 255, 255, .75); }
.live-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 16px; }
.dc { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--g200); border-radius: var(--r-md); overflow: hidden; box-shadow: var(--sh-card); color: var(--text); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.dc:hover { transform: translateY(-3px); box-shadow: var(--sh-pop); }
.dc:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.dc-im { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--sky), var(--blue)); overflow: hidden; }
.dc-im img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.dc:hover .dc-im img { transform: scale(1.05); }
.dc-im::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(26, 17, 90, .25) 0%, rgba(26, 17, 90, 0) 28%, rgba(26, 17, 90, 0) 50%, rgba(26, 17, 90, .82) 100%); pointer-events: none; }
.dc-badge { position: absolute; left: 10px; top: 10px; z-index: 1; background: rgba(255, 255, 255, .94); color: var(--navy); font: 700 12px/1 var(--fh); border-radius: var(--pill); padding: 6px 10px; }
.dc-name { position: absolute; left: 14px; right: 14px; bottom: 12px; z-index: 1; }
.dc-name h3 { color: #fff; font: 700 22px/1.15 var(--fh); letter-spacing: -.2px; }
.dc-name p { color: rgba(255, 255, 255, .92); font-size: 14px; line-height: 20px; margin-top: 2px; }
.dc-body { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 14px 14px 16px; margin-top: auto; }
.dc-price small { display: block; font: 600 12px var(--fh); color: var(--g500); margin-bottom: 2px; }
.dc-price b { font: 800 30px/1 var(--fh); color: var(--navy); letter-spacing: -.5px; }
.dc-price b span { font: 700 14px var(--fh); margin-left: 2px; letter-spacing: 0; }
.dc-when { text-align: right; font-size: 13px; line-height: 18px; min-width: 0; }
.dc-when b { display: block; font: 700 14px/20px var(--fh); color: var(--navy); white-space: nowrap; }
.dc-when span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-seats { position: absolute; right: 10px; top: 10px; z-index: 1; background: var(--red); color: #fff; font: 700 12px/1 var(--fh); border-radius: var(--pill); padding: 6px 10px; }
.lv-more { display: flex; justify-content: center; margin-top: 24px; }
.lv-more .btn[hidden] { display: none; }
@media (max-width: 1000px) { .live-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .lv-from { width: 100%; }
  .lv-from .sel { flex: 1; min-width: 0; }
  .live-grid { grid-auto-flow: column; grid-template-columns: none; grid-auto-columns: 78%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(var(--gutter) * -1); padding: 2px var(--gutter) 10px; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .live-grid::-webkit-scrollbar { display: none; }
  .dc { scroll-snap-align: start; }
  .lv-more { margin-top: 12px; }
}

/* Footer: photo credits */
.credits { margin-top: 14px; font-size: 12px; line-height: 18px; color: var(--g500); }
.credits summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.credits p { margin-top: 6px; }
.credits a { color: inherit; }

/* Cheapest-month chart: price source label */
.cm-src { margin-left: auto; font: 600 12px var(--fh); color: var(--g500); }
.cm-src.is-live { color: var(--navy); display: inline-flex; align-items: center; gap: 6px; }
.cm-src.is-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); animation: livePulse 1.8s ease-out infinite; }
.bar.none { cursor: default; opacity: .55; }
.bar.none .col { background: var(--g200); }

/* Real-fare rows: destinations without a photo get a code tile */
.th-code { display: grid; place-items: center; width: 56px; height: 40px; border-radius: 4px; background: var(--tint); color: var(--navy); font: 700 13px var(--fh); letter-spacing: .5px; }
.ftable .rw-empty { grid-template-columns: 1fr; }
.ftable .rw-empty .dn span { display: block; margin-top: 2px; }

/* Budget tiles: destination count */
.bt .bt-n { font: 700 14px var(--fh); color: var(--navy); }

/* Last-minute cards and airport-table rows: the whole card/row opens TUI search, not just "View" */
#track .card, .ftable .rw { position: relative; }
#track .card .pr .btn::after, .ftable .rw .btn::after { content: ""; position: absolute; inset: 0; }
#track .card .pr .btn:hover, .ftable .rw .btn:hover { filter: none; } /* a filter would shrink the overlay to the button */
#track .card .heart { position: relative; z-index: 1; }
#track .card { transition: box-shadow .2s ease; }
#track .card:hover { box-shadow: var(--sh-pop); }
#track .card:hover .pr .btn, .ftable .rw:hover .btn { background: var(--blue); }
