/*
 * Web trip page — spec: docs/web-design/README.md §5. Composes mobile/css/trip_detail.css (content) and
 * web/css/timeline.css-style arrows. Layout: cover → content column + sticky map (460px).
 */
.wd-body, .wa-body { --wd-side: 460px; --wd-bar: 52px; }

/* cover */
.wd-hero { height: 380px; }
.wd-hero .td-slide { cursor: zoom-in; }
.wd-pill {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 34px;
  padding: 0 14px 0 10px;
  color: #fff;
  font: 650 13px/1 var(--font-ui);
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  border-radius: 999px;
  backdrop-filter: blur(10px);
}
.wd-pill svg { width: 18px; height: 18px; }
.wd-back { top: 16px; left: 24px; }
.wd-hero-actions { position: absolute; z-index: 3; top: 16px; right: 24px; display: flex; align-items: center; gap: var(--space-2); }
.wd-hero-actions .wd-pill { position: static; width: 34px; padding: 0; justify-content: center; }
.wd-hero-text { padding: 0 80px 28px; }
.wd-hero-text h1 { font-size: 38px; letter-spacing: -0.01em; }
.wd-hero .wd-arrow { top: 50%; }
.wd-hero .wt-arrow.is-prev { left: 24px; }
.wd-hero .wt-arrow.is-next { right: 24px; }
.wd-hero:hover .wd-arrow { opacity: 1; }

/* slim bar once the cover has scrolled away */
.wd-bar {
  position: fixed;
  z-index: 650;
  top: var(--w-topbar-height);
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: var(--wd-bar);
  padding: 0 80px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}
.wd-bar.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.wd-bar a { display: inline-flex; align-items: center; gap: 2px; color: var(--ink-2); font: 600 13px/1 var(--font-ui); }
.wd-bar a svg { width: 16px; height: 16px; }
.wd-bar b { overflow: hidden; font: 700 16px/1 var(--font-ui); text-overflow: ellipsis; white-space: nowrap; }
.wd-bar span { color: var(--ink-2); font: 500 13px/1 var(--font-ui); white-space: nowrap; }
.wd-bar .wd-more { display: grid; place-items: center; width: 34px; height: 34px; margin-left: auto; padding: 0; color: var(--ink); background: none; border: 0; border-radius: 50%; }
.wd-bar .wd-more:hover { background: var(--surface-2); }

/* content + sticky map */
.wd-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--wd-side);
  gap: 60px;
  align-items: start;
  padding: var(--space-6) 80px 80px;
}
.wd-content { min-width: 0; }
.wd-stats { max-width: 520px; text-align: left; border: 0; padding: var(--space-2) 0 var(--space-5); margin: 0; }
.wd-stats dd { font-size: 24px; }
.wd-tabs { position: sticky; z-index: 400; top: calc(var(--w-topbar-height) + var(--wd-bar)); padding: 0; margin-bottom: var(--space-5); }
.wd-panel[hidden] { display: none; }
.wd-overview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--space-8); }
.wd-places { margin: 0; padding: 0; list-style: none; }
.wd-places button {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 10px 0;
  color: var(--ink);
  font: inherit;
  text-align: start;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.wd-places button:hover b { color: var(--accent-ink); }
.wd-places span:last-child { display: grid; gap: 2px; min-width: 0; }
.wd-places b { font: 650 14px/1.3 var(--font-ui); }
.wd-places small { color: var(--ink-2); font-size: 12px; }
.wd-place-dot { display: grid; flex: none; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--place); border-radius: 50%; }
.wd-place-dot svg { width: 16px; height: 16px; }
.wd-preview { margin: 0; padding: 0; flex-wrap: wrap; overflow: visible; }
.wd-preview button { cursor: zoom-in; }
.wd-preview img { height: 140px; }
.wd-masonry { column-count: 3; column-gap: var(--space-3); }
.wd-masonry .td-photo { margin-bottom: var(--space-3); cursor: zoom-in; }
.wd-story { max-width: 720px; }
.wd-story .td-story-photo a { cursor: zoom-in; }

.wd-side {
  position: sticky;
  top: calc(var(--w-topbar-height) + var(--wd-bar) + var(--space-4));
  height: calc(100vh - var(--w-topbar-height) - var(--wd-bar) - var(--space-8));
  max-height: 640px;
  overflow: hidden;
  background: var(--surface-2);
  border-radius: var(--radius-card);
}
.wd-map { position: absolute; inset: 0; }
.wd-map-empty { position: absolute; z-index: 500; right: 16px; bottom: 16px; left: 16px; margin: 0; padding: 10px 14px; color: var(--ink-2); font-size: 13px; background: var(--glass); border-radius: 12px; }

/* owner menu + delete dialog */
.wd-menu { position: fixed; z-index: 800; width: 290px; }
.wd-menu small { margin-left: auto; color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.wd-menu .is-danger, .wd-menu .is-danger svg { color: var(--danger); }
.web-app .wd-dialog {
  top: 50%;
  right: auto;
  bottom: auto;
  left: 50%;
  z-index: 920;
  width: 440px;
  padding: var(--space-6);
  border-radius: 18px;
  opacity: 0;
  transform: translate(-50%, -46%);
  transition: opacity 180ms ease, transform 180ms ease;
}
.web-app .wd-dialog[hidden] { display: none; }
.web-app .wd-dialog.is-visible { opacity: 1; transform: translate(-50%, -50%); }

/* photo viewer */
.wd-lightbox {
  position: fixed;
  z-index: 960;
  inset: 0;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 80px;
  align-items: center;
  background: rgba(0, 0, 0, 0.92);
}
.wd-lightbox[hidden] { display: none; }
.wd-lightbox figure { display: grid; gap: var(--space-2); justify-items: center; margin: 0; max-height: 100vh; padding: var(--space-6) 0; }
.wd-lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; }
.wd-lightbox figcaption { color: rgba(255, 255, 255, 0.8); font: 500 14px/1.4 var(--font-ui); text-align: center; }
.wd-lb-nav, .wd-lb-close { display: grid; place-items: center; width: 48px; height: 48px; margin: auto; padding: 0; color: #fff; background: rgba(255, 255, 255, 0.12); border: 0; border-radius: 50%; }
.wd-lb-nav:hover, .wd-lb-close:hover { background: rgba(255, 255, 255, 0.22); }
.wd-lb-nav svg { width: 26px; height: 26px; }
.wd-lb-close { position: absolute; top: 20px; right: 20px; }

/* small laptops: a narrower side column and a single-column overview */
@media (max-width: 1199px) {
  .wd-body, .wa-body { --wd-side: 360px; }
  .wd-grid { gap: 40px; padding-right: 40px; padding-left: 40px; }
  .wd-hero-text, .wa-hero-text { padding-right: 40px; padding-left: 40px; }
  .wd-overview { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .wd-masonry, .wa-masonry { column-count: 2; }
}
