/* Helvi places page (places.html) - builds on site.css, and on events.css for the head, filter bar and states. */

/* The way across to dated events: a quiet pill under the intro. */
.pl-events { display: inline-flex; align-items: center; gap: 8px; margin-top: 20px; padding: 9px 16px 9px 13px; border-radius: 999px; font-size: 14.5px; font-weight: 700; color: var(--ink); text-decoration: none; background: rgba(27, 20, 22, .06); transition: background .25s; }
.pl-events svg { width: 17px; height: 17px; flex: none; color: var(--red-text); }
.pl-events:hover { background: rgba(27, 20, 22, .1); }
.pl-arrow { display: inline-block; transition: transform .3s var(--ease); }
.pl-events:hover .pl-arrow { transform: translateX(3px); }
@media (min-width: 621px) { .pl-bar .ev-select { flex-basis: 236px; } }

/* ───────────── Cards ─────────────
   --accent follows the kind of place: green for playgrounds, violet for activities. */
.pl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 16px; padding-top: 28px; }
.pl-card { --accent: var(--green); --accent-text: var(--green-text); --accent-tint: #E5F7EE; display: flex; flex-direction: column; min-width: 0; padding: 22px; border-radius: 26px; background: var(--card); box-shadow: 0 0 0 1px var(--line), 0 18px 30px -26px rgba(27, 20, 22, .45); scroll-margin-top: calc(var(--ev-nav, 76px) + 120px); content-visibility: auto; contain-intrinsic-size: auto 430px; transition: box-shadow .4s var(--ease); }
.pl-card[data-category="activity"] { --accent: var(--violet); --accent-text: var(--violet-text); --accent-tint: #F3E9FA; }
.pl-card:hover { box-shadow: 0 0 0 1px var(--line), 0 26px 40px -26px rgba(27, 20, 22, .55); }
/* A shared link to one place (#id) marks the card it lands on. */
.pl-card:target { box-shadow: 0 0 0 2px var(--accent-text), 0 26px 40px -26px rgba(27, 20, 22, .55); }

.pl-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 16px; }
.pl-kind { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 800; line-height: 1.3; color: var(--accent-text); background: var(--accent-tint); }
.pl-kind svg { width: 16px; height: 16px; flex: none; }
.pl-price { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: right; }
.pl-price[data-free] { color: #0B7A49; }
.pl-card h2 { font-size: clamp(21px, 2vw, 24px); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; text-wrap: balance; overflow-wrap: anywhere; }
.pl-where { display: flex; align-items: center; gap: 5px; min-width: 0; margin-top: 7px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pl-where svg { width: 14px; height: 14px; flex: none; }
.pl-where abbr { text-decoration: none; cursor: help; }
.pl-distance { flex: none; margin-left: auto; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 800; white-space: nowrap; color: var(--ink); background: rgba(27, 20, 22, .06); font-variant-numeric: tabular-nums; }
.pl-distance:empty { display: none; }

/* Open or closed right now, and until when: places.js keeps it current. */
.pl-live:empty { display: none; }
.pl-status { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--muted); }
.pl-status b { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; color: var(--ink); }
.pl-status b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #B9AEB1; }
.pl-status[data-status="open"] b { color: #0B7A49; }
.pl-status[data-status="open"] b::before { background: var(--green); box-shadow: 0 0 0 3px rgba(34, 181, 115, .2); }
.pl-status[data-status="closed"] b { color: var(--red-text); }
.pl-status[data-status="closed"] b::before { background: var(--red-hi); }
.pl-status span::before { content: "·"; margin-right: 6px; }

.pl-description { margin-top: 12px; font-size: 15.5px; line-height: 1.55; color: #463A3D; text-wrap: pretty; }

/* The week, folded away until asked for. */
.pl-week { margin-top: 16px; border-radius: 16px; background: #FBF2EC; }
.pl-week summary { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; border-radius: 16px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; }
.pl-week summary::-webkit-details-marker { display: none; }
.pl-week summary svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.pl-week summary:hover .pl-chev { color: var(--ink); }
.pl-sum-today { margin-left: auto; min-width: 0; padding-left: 4px; font-size: 13px; font-weight: 600; text-align: right; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.pl-sum-today:empty { display: none; }
.pl-chev { margin-left: auto; transition: transform .3s var(--ease); }
.pl-sum-today:not(:empty) + .pl-chev { margin-left: 0; }
.pl-week[open] .pl-chev { transform: rotate(180deg); }
.pl-hours { margin: 0; padding: 0 14px; font-size: 14px; }
.pl-hours div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-top: 1px solid var(--line); }
.pl-hours dt { color: #463A3D; }
.pl-hours dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.pl-hours [data-closed] dd { font-weight: 600; color: var(--muted); }
.pl-hours .pl-today dt, .pl-hours .pl-today dd { font-weight: 800; color: var(--ink); }
.pl-hours-note { padding: 6px 14px 12px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* Each card is as tall as its own content: no empty gap above the buttons when a neighbour is longer. */
.pl-actions { display: flex; gap: 8px; margin-top: 18px; }
.pl-btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 0; min-height: 44px; padding: 0 14px; border-radius: 999px; font-size: 14.5px; font-weight: 700; white-space: nowrap; text-decoration: none; color: var(--ink); background: rgba(27, 20, 22, .07); transition: background .25s, transform .25s var(--ease), box-shadow .25s; }
.pl-btn svg { width: 15px; height: 15px; flex: none; }
.pl-btn:hover { background: rgba(27, 20, 22, .11); }
.pl-btn--go { color: #fff; background: var(--ink); }
.pl-btn--go:hover { background: #000; transform: translateY(-1px); box-shadow: 0 10px 20px -10px rgba(27, 20, 22, .7); }
.pl-meta { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; font-size: 12.5px; line-height: 1.45; color: var(--muted); }
.pl-meta a { color: inherit; text-underline-offset: 2px; }
.pl-meta a:hover { color: var(--ink); }

.pl-page :focus-visible { outline: 3px solid var(--red-text); outline-offset: 3px; }
.pl-page button, .pl-page summary, .pl-btn { touch-action: manipulation; }

@media (max-width: 1000px) { .pl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .pl-events { margin-top: 16px; font-size: 14px; }
  .pl-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-top: 20px; }
  .pl-card { padding: 18px; border-radius: 22px; contain-intrinsic-size: auto 400px; scroll-margin-top: 84px; }
  .pl-top { margin-bottom: 12px; }
  .pl-card h2 { font-size: 21px; }
  .pl-description { font-size: 15px; }
  /* Text-only type buttons leave room for Open now in the first screenful of the sideways row. */
  .pl-bar .ev-seg svg { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .pl-chev, .pl-arrow, .pl-btn, .pl-card { transition: none; }
}

/* "Show more" under the list. */
.pl-more { display: flex; justify-content: center; margin-top: 28px; }
.pl-more[hidden] { display: none; }
.pl-card h2 a { color: inherit; text-decoration: none; }
.pl-card h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
