/* ============================================================================
   DETAIL PAGES of the inner layer (Docs/plan-inner-pages.md, Phase 4)
   /place/*, /event/*, /festival/* (without a programme), /announcements/*, /page/*

   Approved mockups: Docs/mockups/inner-pages/place.html (a sparse record) and
   place-full.html (every block a record can have).
   Loads after css/public/inner.css, which owns .panel, .kv, .faq, .sec, .grid, .pcard,
   .article and .empty. Everything here is the detail template only.

   1. head        2. advisory     3. photographs   4. story + panel
   5. hours       6. reviews      (the report sheet is dialog.sheet in css/public/inner.css)
   ============================================================================ */

/* ---------- 1. HEAD — name as headline, three facts beside it ---------- */
.pl-head { display: grid; gap: var(--s6); padding: clamp(24px, 4vw, 48px) var(--gutter) var(--s7); }
.pl-head .kicker { color: var(--ci, var(--ink-3)); }
.pl-head h1 { font-size: var(--fs-xl); margin-top: var(--s4); overflow-wrap: anywhere; }
.pl-head h1 em { color: var(--red-ink); }
/* a long name, or a headline that is a sentence, steps down so it does not fill the screen */
.pl-head h1.is-long { font-size: var(--fs-l); }
.pl-head h1.is-longer { font-size: clamp(1.9rem, 3.6vw, 3.4rem); line-height: 1.04; }
.pl-head .lead { margin: var(--s5) 0 0; color: var(--ink-2); }
.pl-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: var(--s6); }
/* .share lives in css/public/inner.css (content pages use it without this file) */
/* the one fact that takes a colour: can I go now? */
.facts .open dd { color: var(--g-see-ink); }
.facts .shut dd { color: var(--red-ink); }
@media (min-width: 900px) {
  .pl-head { grid-template-columns: 1.5fr 1fr; align-items: end; gap: 5vw; }
  .pl-head .facts { justify-content: flex-end; text-align: right; margin: 0; }
}

/* the rating as five glyphs, filled to --v out of 5 */
.stars { display: inline-block; font-size: 1rem; line-height: 1; letter-spacing: 3px; background: linear-gradient(90deg, var(--ink) calc(var(--v, 0) / 5 * 100%), rgba(23, 20, 15, .2) 0); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 2. ADVISORY — a ruled band between the head and the photographs ---------- */
.advisory { display: grid; gap: 6px 24px; margin: 0 var(--gutter) var(--s6); padding: 16px 0 16px 20px; border-left: 3px solid var(--ink); }
.advisory[data-level="warning"], .advisory[data-level="critical"] { border-color: var(--red); }
.advisory[data-level="critical"] { padding-right: 20px; background: var(--paper-2); }
.advisory[data-level="critical"] .label { color: var(--red-ink); }
.advisory .label { margin: 0; color: var(--ink-3); }
.advisory p { margin: 0; max-width: 48rem; }
@media (min-width: 900px) { .advisory { grid-template-columns: 12rem 1fr; align-items: baseline; } }

/* ---------- 3. PHOTOGRAPHS — one large, two beside it; the rest open in the lightbox ---------- */
.pl-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0 var(--gutter); list-style: none; }
.pl-photos > li { position: relative; }
.pl-photos .ph { aspect-ratio: 4 / 3; height: 100%; }
.pl-photos > li:first-child { grid-column: 1 / -1; }
.pl-photos > li:first-child .ph { aspect-ratio: 16 / 10; }
.pl-photos > li:only-child .ph { aspect-ratio: 16 / 8; }
.pl-photos a { display: block; height: 100%; }
.pl-photos .more { display: none; }             /* photographs past the third: in the page for the lightbox, not drawn */
:where(body.pub-editorial) .pl-all, .pl-all { position: absolute; right: 12px; bottom: 12px; z-index: 2; min-height: 44px; padding: 11px 14px 10px; border: 0; background: var(--paper); color: var(--ink); font: 700 .68rem/1 var(--f-sans); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; }
.pl-all:hover { background: var(--ink); color: var(--paper); }
.pl-photos .is-video .ph::after { content: ""; position: absolute; inset: 0; background: color-mix(in srgb, var(--night) 28%, transparent); }
.pl-play { position: absolute; left: 50%; top: 50%; z-index: 2; display: grid; place-items: center; width: 64px; height: 64px; margin: -32px 0 0 -32px; border: 1.5px solid #fff; border-radius: 50%; color: #fff; pointer-events: none; }
.pl-play svg { width: 18px; height: 18px; margin-left: 3px; }
@media (min-width: 900px) {
  .pl-photos { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; height: min(72vh, 640px); gap: 14px; }
  .pl-photos .ph, .pl-photos > li:first-child .ph { aspect-ratio: auto; }
  .pl-photos > li:first-child { grid-column: 1; grid-row: 1 / 3; }
  .pl-photos > li:only-child { grid-column: 1 / -1; }
  .pl-photos.is-two > li:nth-child(2) { grid-row: 1 / 3; }
}

/* ---------- 4. STORY + PANEL — what it is on the left, how to go on the right ---------- */
.pl-body { display: grid; gap: var(--s8); padding: clamp(48px, 9vh, 96px) var(--gutter); }
.pl-story { min-width: 0; }
.pl-story > h2 { margin: 0 0 var(--s5); color: var(--ink-3); }
.pl-story > h2:not(:first-child) { margin-top: var(--s8); }
/* the office's own rich text: the first paragraph is set as the standfirst */
.pl-text { max-width: 38rem; font-size: 1.06rem; line-height: 1.7; color: var(--ink-2); overflow-wrap: anywhere; }
.pl-text > :first-child { margin-top: 0; }
.pl-text p { margin: 0 0 1.1em; }
.pl-text > p.first, .pl-text--lead > p:first-child { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.35rem, 2.1vw, 1.9rem); line-height: 1.28; letter-spacing: -.012em; color: var(--ink); font-variation-settings: "SOFT" 100; }
.pl-text a { text-underline-offset: 3px; }
/* text typed as plain lines in Admin (events, festivals): keep its line breaks */
.pl-text--plain { margin: 0; white-space: pre-line; }
.pl-text img { max-width: 100%; height: auto; }
.pl-text ul, .pl-text ol { margin: 0 0 1.1em; padding-left: 1.3em; }
/* highlights written as a list become the numbered column of the mockup */
.pl-text--high ul, .pl-text--high ol { padding: 0; list-style: none; counter-reset: h; border-top: 1px solid var(--rule); }
.pl-text--high li { counter-increment: h; display: grid; grid-template-columns: 2.6rem 1fr; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 1.02rem; line-height: 1.5; }
.pl-text--high li::before { content: counter(h, decimal-leading-zero); font-family: var(--f-display); font-style: italic; font-size: 1.05rem; color: var(--ink-3); }
/* amenities: a plain list in columns. No icons (D8): the words are the content. */
.pl-amen { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 32px; max-width: 38rem; }
.pl-amen li { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: .95rem; break-inside: avoid; }
@media (min-width: 640px) { .pl-amen { columns: 3; } }
.pl-updated { margin: var(--s6) 0 0; font-size: .78rem; color: var(--ink-3); }

.panel .btn { width: 100%; justify-content: center; }
/* a phone number or an address is something to tap: give it a finger-sized target without moving the rows */
.kv a, .pl-head .facts dd a { display: inline-block; padding-block: 12px; margin-block: -12px; }
.kv .note { display: block; margin-top: 2px; font-size: .82rem; color: var(--ink-3); }
.pl-map { height: 220px; margin: var(--s5) 0; background: var(--map-sea); }
.pl-map .leaflet-tile-pane { filter: grayscale(.2) sepia(.2) saturate(.95); }
.pl-pin { position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px var(--paper), 0 4px 10px rgba(0, 0, 0, .45); }
.checkin-block { margin: 18px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); font-size: .85rem; color: var(--ink-2); }
.checkin-block p { margin: 0; }
.checkin-block a, .checkin-block button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; font: 700 .85rem/1.2 var(--f-sans); color: var(--ink); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@media (min-width: 900px) {
  .pl-body { grid-template-columns: 1.4fr 1fr; gap: 6vw; align-items: start; }
}
/* The panel follows the reader only where it fits: on a short screen a pinned panel taller than
   the window would keep its map and "Get directions" out of reach until the story ended. */
@media (min-width: 900px) and (min-height: 960px) { .pl-body > .panel { position: sticky; top: calc(var(--hdr) + 24px); } }

/* ---------- 5. HOURS — the week in the panel, today in bold with a rule beside it ---------- */
.hours { width: 100%; margin: var(--s5) 0 0; border-collapse: collapse; font-size: .92rem; }
.hours caption { padding: 0 0 8px; text-align: left; color: var(--ink-3); }
.hours th, .hours td { padding: 9px 0; border-bottom: 1px solid var(--rule); font-weight: 400; text-align: left; }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours tr.today th, .hours tr.today td { font-weight: 700; }
.hours tr.today th { box-shadow: -12px 0 0 -9px var(--red); }
.hours .closed { color: var(--ink-3); }

/* ---------- 6. REVIEWS — the figure, the spread, then each visitor in a ruled row ---------- */
.reviews { background: var(--paper-2); }
.reviews .empty { padding: var(--s7) 0 0; text-align: left; }
.rating { display: grid; gap: var(--s6); padding: var(--s7) 0 0; }
.rating .fig { margin: 0; font-family: var(--f-display); font-size: clamp(3.4rem, 7vw, 5.6rem); line-height: .9; font-variation-settings: "SOFT" 100; }
.rating .fig small { display: block; margin-top: 12px; font: 400 .9rem/1.4 var(--f-sans); color: var(--ink-2); }
.spread { margin: 0; padding: 0; list-style: none; max-width: 26rem; }
.spread li { display: grid; grid-template-columns: 1.4rem 1fr 2rem; align-items: center; gap: 12px; padding: 5px 0; font-size: .82rem; font-variant-numeric: tabular-nums; }
.spread progress { display: block; width: 100%; height: 3px; border: 0; background: rgba(23, 20, 15, .14); appearance: none; -webkit-appearance: none; }
.spread progress::-webkit-progress-bar { background: rgba(23, 20, 15, .14); }
.spread progress::-webkit-progress-value { background: var(--ink); }
.spread progress::-moz-progress-bar { background: var(--ink); }
.spread span:last-child { text-align: right; color: var(--ink-3); }
@media (min-width: 900px) { .rating { grid-template-columns: auto 1fr auto; align-items: end; gap: 6vw; } }

.rev-list { margin: var(--s7) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule); }
.rev { display: grid; gap: 12px 5vw; padding: var(--s6) 0; border-bottom: 1px solid var(--rule); }
.rev .by b { display: block; font-size: 1rem; }
.rev .by span { display: block; margin-top: 2px; font-size: .8rem; color: var(--ink-3); }
/* inline-block: the fill is measured across the glyphs, not across the column */
.rev .by .stars { display: inline-block; margin-top: 10px; font-size: 1rem; color: transparent; }
.rev h3 { margin: 0 0 8px; font-family: var(--f-display); font-weight: 500; font-size: 1.3rem; line-height: 1.2; font-variation-settings: "SOFT" 100; }
.rev p { margin: 0; max-width: 40rem; line-height: 1.65; color: var(--ink-2); overflow-wrap: anywhere; }
.rev-photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.rev-photos .ph { width: 84px; aspect-ratio: 1; }
.rev-photos li { width: 84px; }
.rev-photos button { width: 100%; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink-3); font: 400 .72rem/1.2 var(--f-sans); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rev .by a { text-underline-offset: 4px; }
.rev-list--flush { margin-top: 0; }
.reply { margin: 16px 0 0; padding: 14px 0 2px 18px; border-left: 2px solid var(--ink); max-width: 40rem; }
.reply .label { margin: 0; color: var(--ink-3); }
.reply p:not(.label) { margin-top: 6px; font-size: .95rem; }
.rev-acts { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-top: 14px; font-size: .8rem; }
.rev-acts button, .rev-acts a { min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink-2); font: inherit; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
@media (min-width: 900px) { .rev { grid-template-columns: 14rem 1fr; } }
.rev-more { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin: 0; padding: var(--s6) 0 0; font-size: .85rem; color: var(--ink-3); }
.reviews .pager { padding: var(--s6) 0 0; justify-content: flex-start; }
