/* Tours pages v2 (flag ToursV2): the Events list and Event page (events.css) for tours, plus what only tours have -
   the "Find a tour" box, the photo strip, highlights, itinerary and the dates list. Depends on tokens.css +
   components.css + events.css. Colours are tokens only. Phones (<= 900px) follow events.css. */

/* ---- List ------------------------------------------------------------------------------------------------ */
.cg-tbar { padding-bottom: 10px; }
.cg-tbar__note { margin: 0; font-size: 14px; color: var(--ink-caption); }
.cg-tour .cg-ev__ph { min-height: 104px; }
.cg-tour .cg-ev__ph img[data-cg-broken] { visibility: hidden; }
.cg-tour__op { color: var(--ink-muted); }
.cg-dblock--tba { gap: 4px; padding: 10px 4px; text-align: center; }
.cg-dblock--tba .cg-dblock__m, .cg-dblock--tba .cg-dblock__w { font-size: 11px; line-height: 1.15; }
.cg-tfind__q { width: 100%; height: 44px; padding: 0 16px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface);
  color: var(--ink); font: inherit; font-size: 15px; }
.cg-tfind__q:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.cg-tour[hidden], .cg-evgroup[hidden], .cg-evrows[hidden] { display: none; }
/* Datahub tours: the next departure's state (waitlist / on request / few left); the long Country filter scrolls. */
.cg-tstate--waitlist, .cg-tstate--on-request { background: var(--surface-soft); color: var(--ink-muted); }
.cg-tstate--few-left { background: var(--warn-tint); color: var(--on-warn); }
.cg-tstate--open { background: var(--live-tint); color: var(--on-live); }
.cg-tcountries { max-height: 320px; overflow-y: auto; }

/* ---- Tour page ------------------------------------------------------------------------------------------- */
.cg-tfind[hidden] { display: none; }
.cg-tfacts__fine { display: block; font-size: 13px; color: var(--ink-caption); }
.cg-tgallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.cg-tgallery li { aspect-ratio: 3 / 2; border-radius: var(--radius-m); overflow: hidden; background: var(--surface-warm); }
.cg-tgallery img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cg-tlede { color: var(--ink); }
.cg-thigh { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; max-width: 860px; }
.cg-thigh li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; line-height: 1.5; color: var(--ink-muted); }
.cg-thigh svg { flex: none; margin-top: 3px; color: var(--accent); }
.cg-titin { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; counter-reset: cgstep; max-width: 860px; }
.cg-titin li { position: relative; padding: 14px 18px 14px 58px; border-radius: var(--radius-l); background: var(--surface); counter-increment: cgstep; }
.cg-titin li::before { content: counter(cgstep); position: absolute; left: 16px; top: 14px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--surface-warm); color: var(--ink); font-size: 14px; font-weight: var(--w-strong); display: flex; align-items: center; justify-content: center; }
.cg-titin h3 { margin: 0 0 4px; font-size: 16px; font-weight: var(--w-strong); color: var(--ink); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.cg-titin__day { color: var(--ink-caption); }
.cg-titin p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--ink-muted); white-space: pre-line; overflow-wrap: anywhere; }
.cg-tdates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; max-width: 760px; }
.cg-tdates li { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; padding: 12px 16px; border-radius: var(--radius-l); background: var(--surface); font-size: 16px; }
.cg-tdates time { font-weight: var(--w-strong); color: var(--ink); min-width: 210px; }
.cg-tdates span { color: var(--ink-muted); }
.cg-tdates .cg-ev__tag { margin-left: auto; }
.cg-tdates--past time { color: var(--ink-muted); }
.cg-tsub { margin: 8px 0 0; font-size: 17px; font-weight: var(--w-strong); color: var(--ink); }
/* Datahub dates: price, state and the departure's own booking link; the operator's credit under the list. */
.cg-tdates--book .cg-ev__tag { margin-left: 0; }
.cg-tdates__price { font-weight: var(--w-strong); }
.cg-tdates__book { margin-left: auto; font-size: 15px; font-weight: var(--w-strong); color: var(--link); white-space: nowrap; }
.cg-tcredit { margin: 4px 0 0; font-size: 14px; color: var(--ink-caption); }
.cg-tcredit a { color: var(--ink-muted); text-decoration: underline; text-underline-offset: 2px; }
.cg-tended { flex-wrap: wrap; }
/* A datahub tour's photo is the operator's share image: "Photo: <operator>" over its lower corner. */
.cg-thero { position: relative; }
.cg-tphoto { position: absolute; right: 10px; bottom: 10px; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--scrim);
  color: var(--on-panel); font-size: 12px; line-height: 1.6; }

@media (max-width: 900px) {
  .cg-tbar__note { font-size: 13px; }
  .cg-tgallery { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 42%; overflow-x: auto; scrollbar-width: none; }
  .cg-tgallery::-webkit-scrollbar { display: none; }
  .cg-thigh { grid-template-columns: minmax(0, 1fr); }
  .cg-titin li { padding: 12px 14px 12px 52px; }
  .cg-titin li::before { left: 12px; top: 12px; }
  .cg-tdates time { min-width: 0; }
  body.cg-page-tours .cg-footer .cg-wrap, body.cg-page-tour .cg-footer .cg-wrap { padding-bottom: calc(24px + 76px + env(safe-area-inset-bottom, 0px)); }
}
