/* Listings (screens/listings.js), Add a trip (listings/voice.js) and the cover
   maker (listings/cover.js). Built on base.css tokens only: no new colours,
   no yellow in the CRM's own chrome. */

/* ---------- the screen */
.lst-sum { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 14px; color: var(--ink-2); margin: 0; }
.lst-sum b { color: var(--ink); font-size: 16px; font-weight: 700; margin-right: 2px; }
.lst-strip { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px 14px; border-radius: 12px; background: var(--warn-bg); color: var(--ink); font-size: 13.5px; }
.lst-strip .chip { background: #fff; }

.lst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.lst-card { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #fff; transition: box-shadow .15s, transform .15s, border-color .15s; }
.lst-card:hover { box-shadow: 0 14px 32px -18px rgba(16,24,40,.35); transform: translateY(-1px); border-color: var(--line-2); }
.lst-card:focus-within { border-color: var(--brand-line); box-shadow: 0 0 0 3px var(--brand-tint); }
.lst-cover { position: relative; aspect-ratio: 16 / 10; background: var(--tile); overflow: hidden; }
.lst-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lst-nocover { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--brand-text); background: var(--brand-tint); font-size: 13px; font-weight: 600; }
.lst-nocover svg { width: 30px; height: 30px; }
/* chips sit under the photo, never on it: the agency's logo is on the photo */
.lst-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.lst-body { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; flex: 1; }
.lst-body h2 { font-size: 16px; line-height: 22px; font-weight: 700; }
/* the whole card opens the package: the title's button stretches over it */
.lst-hit { all: unset; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lst-hit::after { content: ''; position: absolute; inset: 0; }
.lst-hit:focus-visible { outline: none; }
.lst-when { font-size: 13.5px; color: var(--ink-2); margin: 0; }
.lst-when span { margin-left: 6px; color: var(--brand-text); font-weight: 600; }
.lst-foot { margin-top: auto; padding-top: 12px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.lst-price { margin: 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.lst-price b { font-size: 20px; color: var(--ink); font-weight: 700; margin-right: 2px; }
.lst-seats { flex: 0 1 130px; min-width: 96px; display: flex; flex-direction: column; gap: 4px; text-align: right; }
.lst-seats small { font-size: 12px; color: var(--ink-2); font-weight: 600; }

.lst-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 44px 24px; }
.lst-hero h2 { font-size: 22px; line-height: 28px; font-weight: 700; margin-top: 6px; }
.lst-hero p { max-width: 460px; color: var(--ink-2); font-size: 14.5px; }
.lst-hero-mic { width: 84px; height: 84px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--brand); color: var(--brand-on); box-shadow: 0 0 0 10px var(--brand-tint); transition: transform .15s, box-shadow .15s; }
.lst-hero-mic:hover { transform: scale(1.04); box-shadow: 0 0 0 14px var(--brand-tint); }
.lst-hero-mic svg { width: 34px; height: 34px; }
.lst-hero-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.btn > svg { width: 16px; height: 16px; flex: none; }

.lst-holdcard .list .row { padding: 10px 0; }
.lst-demand { padding: 0; }
.lst-demand > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 24px; }
.lst-demand > summary::-webkit-details-marker { display: none; }
.lst-demand > summary p { color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.lst-demand > summary h2::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: translateY(-3px) rotate(45deg); transition: transform .15s; }
.lst-demand[open] > summary h2::after { transform: translateY(0) rotate(225deg); }
.lst-demand-body { padding: 0 24px 22px; display: flex; flex-direction: column; gap: 16px; }
.kpis.three { grid-template-columns: repeat(3, 1fr); }

/* the package drawer */
.lst-dcover { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--tile); }
.lst-dcover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lst-dacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: -6px; }
.lst-deps { width: 100%; border-collapse: collapse; font-size: 13px; }
.lst-deps th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 0 8px 8px 0; }
.lst-deps td { padding: 10px 8px 10px 0; border-top: 1px solid var(--line); vertical-align: middle; }
.lst-deps .paybar { width: 70px; }
.lst-deps small { display: block; font-size: 11.5px; color: var(--ink-2); }
.lst-deps tr.click { cursor: pointer; }
.lst-deps tr.click:hover td { background: var(--hover); }

@media (max-width: 760px) {
  .lst-grid { grid-template-columns: 1fr; gap: 14px; }
  .lst-hero { padding: 32px 16px; }
  .lst-demand > summary { padding: 16px; }
  .lst-demand-body { padding: 0 16px 18px; }
  .kpis.three { grid-template-columns: 1fr; }
  .page-head .head-actions { flex-wrap: wrap; }
}

/* ---------- Add a trip */
.vt-rec { --lvl: 0; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 14px; background: var(--brand-tint); }
.vt-mic { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 0; flex: none; display: grid; place-items: center; cursor: pointer; background: var(--brand); color: var(--brand-on); }
.vt-mic svg { width: 28px; height: 28px; position: relative; z-index: 1; }
.vt-mic::before { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--brand-line); transform: scale(calc(1 + var(--lvl) * .35)); transition: transform .08s linear; }
.vt-rec[data-state="on"] .vt-mic { background: var(--crit); }
.vt-rec[data-state="on"] .vt-mic::before { border-color: var(--crit-bg); }
.vt-rec[data-state="busy"] .vt-mic { opacity: .6; cursor: progress; }
.vt-rec[data-state="busy"] .vt-mic::before { animation: vt-spin 1s linear infinite; border-color: var(--brand) transparent var(--brand) transparent; }
@keyframes vt-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .vt-rec[data-state="busy"] .vt-mic::before { animation: none; } }
.vt-meta { display: flex; flex-direction: column; gap: 2px; }
.vt-meta b { font-size: 15px; }
.vt-meta span { font-size: 13px; color: var(--ink-2); }
.vt-say { font-size: 13.5px; color: var(--ink); margin: 0; }
#vt-text { width: 100%; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.5; resize: vertical; }
.vt-miss-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-bg); color: var(--warn); font-size: 13.5px; font-weight: 600; }
.vt-note { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--tile); color: var(--ink); font-size: 13.5px; }
.vt-miss > span::after { content: 'Not said'; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--warn); background: var(--warn-bg); border-radius: 6px; padding: 1px 6px; }
.vt-miss input, .vt-miss textarea { border-color: var(--warn) !important; }

/* ---------- the cover field in a listing form */
.cv-prev { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; background: var(--tile); }
.cv-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-prev.empty { aspect-ratio: auto; height: 96px; display: grid; place-content: center; justify-items: center; gap: 6px; background: var(--brand-tint); color: var(--brand-text); font-size: 13px; }
.cv-prev.empty svg { width: 28px; height: 28px; }
.cv-acts { display: flex; align-items: center; gap: 12px; }

/* ---------- the cover maker */
.cv-dlg { width: min(940px, calc(100vw - 24px)); max-height: calc(100vh - 24px); border: 0; border-radius: 18px; padding: 0; color: var(--ink); background: #fff; box-shadow: 0 30px 80px -30px rgba(16,24,40,.55); display: flex; flex-direction: column; overflow: hidden; }
.cv-dlg:not([open]) { display: none; }
.cv-dlg::backdrop { background: rgba(16,24,40,.45); }
.cv-head, .cv-tabs, .cv-foot { flex: none; }
.cv-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.cv-head h2 { font-size: 18px; }
.cv-tabs { display: flex; gap: 4px; padding: 10px 22px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.cv-tabs button { border: 0; background: none; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--ink-2); padding: 8px 12px 10px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.cv-tabs button[aria-selected="true"] { color: var(--brand-text); border-bottom-color: var(--brand); }
.cv-body { padding: 18px 22px; overflow: auto; flex: 1; min-height: 0; }
.cv-drop { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 48px 20px; border: 2px dashed var(--line-2); border-radius: 14px; cursor: pointer; color: var(--ink-2); outline: none; }
.cv-drop svg { width: 34px; height: 34px; color: var(--brand-text); }
.cv-drop b { color: var(--ink); font-size: 15px; }
.cv-drop:hover, .cv-drop:focus-visible, .cv-drop.over { border-color: var(--brand); background: var(--brand-tint); }
.cv-search { display: flex; gap: 8px; }
.cv-search input { flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 12px; font: inherit; }
.cv-shelf { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.cv-shelf .chip { border: 0; cursor: pointer; height: 26px; padding: 0 10px; font-size: 12.5px; }
.cv-shelf .chip:hover { background: var(--brand-tint); color: var(--brand-text); }
.cv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cv-tile { position: relative; aspect-ratio: 16 / 10; border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--tile); display: block; }
.cv-tile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.cv-tile:hover img { transform: scale(1.04); }
.cv-tile:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.cv-tile span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 5px; font-size: 11px; font-weight: 600; color: #fff; text-align: left; background: linear-gradient(transparent, rgba(12,22,34,.7)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cv-tile.skel { cursor: default; }
.cv-none { grid-column: 1 / -1; color: var(--ink); font-size: 14px; padding: 18px 0; }
.cv-src { font-size: 12.5px; color: var(--ink-2); margin: 12px 0 0; }
.cv-src a, .cv-nologo a { color: var(--brand-text); font-weight: 600; }
.cv-loading { height: 360px; border-radius: 12px; }

.cv-edit { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 1fr); gap: 22px; align-items: start; }
.cv-stage { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cv-shape { display: inline-flex; align-self: flex-start; gap: 2px; padding: 3px; border-radius: 10px; background: var(--tile); }
.cv-shape button, .cv-seg button { border: 0; background: none; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.cv-shape button[aria-checked="true"], .cv-seg button[aria-checked="true"] { background: #fff; color: var(--brand-text); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.cv-canvas { display: block; width: 100%; height: auto; max-height: 56vh; object-fit: contain; border-radius: 12px; background: var(--tile); cursor: grab; touch-action: none; }
.cv-canvas.grab { cursor: grabbing; }
.cv-credit { font-size: 12px; color: var(--ink-2); margin: 0; }
.cv-tools { display: flex; flex-direction: column; gap: 16px; }
.cv-tools input[type="range"] { width: 100%; accent-color: var(--brand); }
.cv-tools input:not([type]) { height: 38px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; font: inherit; }
.cv-on { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.cv-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--tile); align-self: flex-start; }
.cv-c { display: block; width: 22px; height: 16px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.cv-c::after { content: ''; position: absolute; width: 7px; height: 5px; background: currentColor; border-radius: 1px; }
.cv-c.tl::after { top: 2px; left: 2px; } .cv-c.tr::after { top: 2px; right: 2px; } .cv-c.bl::after { bottom: 2px; left: 2px; } .cv-c.br::after { bottom: 2px; right: 2px; }
.cv-nologo { font-size: 13px; margin: 0; color: var(--ink); }
.cv-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cv-foot .grow { flex: 1; }

@media (max-width: 760px) {
  .cv-dlg { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .cv-edit { grid-template-columns: 1fr; }
  .cv-grid { grid-template-columns: repeat(2, 1fr); }
  .cv-foot .grow { display: none; }
  .cv-foot .btn { flex: 1 1 auto; justify-content: center; }
}
/* Featured trips (B1.9, 0216): the agency's yes to WanderBuddy's Instagram and Threads */
.lst-feature header { align-items: center; gap: 14px; }
.lst-feature header h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lst-feature header p { max-width: 70ch; }
.lst-feature header .btn { flex: none; }
