/* =====================================================================
   DOSIK TECHNOLOGY · PAGE CSS · CONTACT (/contact): channel cards, form + aside, weekly hours chart, blueprint map card
   Load after inner.css, on that page only.
   ===================================================================== */


.chan { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: clamp(28px, 4vw, 48px); }
.chan__card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 22px; border-radius: var(--r-l);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-2);
}
/* the card's own button keeps its label on one line (the grid gives the card the room, see the phone rule) */
.chan__card .btn { white-space: nowrap; }
.chan__card .icon-tile { --it: 48px; margin-bottom: 6px; }
.chan__card small { font-size: var(--fz-xs); color: var(--text-3); }
.chan__card strong { font: var(--fw-semibold) 1.2rem/1.3 var(--f-display); color: var(--text); }
.chan__card p { font-size: var(--fz-sm); color: var(--text-2); line-height: 1.55; }
.chan__card .btn, .chan__card .chan__links { margin-top: auto; }
.chan__card p + .btn, .chan__card strong + .chan__links { margin-block-start: auto; }
.chan__card--wa .icon-tile { background: color-mix(in srgb, var(--wa-500) 16%, #fff); color: #0B6B3A; }
.chan__links { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.chan__links a { display: inline-flex; align-items: center; gap: 6px; font: var(--fw-medium) var(--fz-sm)/1.3 var(--f-display); color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.chan__links .ico { width: 16px; height: 16px; }
.cgrid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.cgrid__aside { display: grid; gap: 16px; position: sticky; top: calc(var(--hdr-h) + 24px); }
/* weekly hours: 24-hour bars, the open window in teal, today's bar marked with "now" (core.js §6) */
.hours { padding: 22px; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.hours__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-bottom: 14px; }
.hours__head h3 { font-size: 1.12rem; font-weight: var(--fw-semibold); }
.hours__list { display: grid; gap: 7px; }
.hours__row { display: grid; grid-template-columns: 3.6em minmax(0, 1fr); align-items: center; gap: 12px; font-size: var(--fz-sm); color: var(--text-2); }
.hours__row dt { font-weight: var(--fw-medium); color: var(--text); }
.hours__row dd { display: grid; grid-template-columns: minmax(0, 1fr) 6.4em; align-items: center; gap: 12px; }
.hours__row dd > span:last-child { text-align: end; }
.hours__bar { position: relative; height: 10px; border-radius: 6px; background: var(--bg-2); overflow: visible; }
/* the opening window: an SVG rect the server positions from site.json (x = 1 − closes, width = closes − opens, of 24 h; time
   runs right to left like the axis). Razor port of the reference's ::before, which had 8:30 → 17:00 fixed in the CSS. */
.hours__defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.hours__g0 { stop-color: var(--teal-500); }
.hours__g1 { stop-color: var(--sky-400); }
.hours__win { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.hours__win rect { fill: url(#hours-g); }
.hours__row--off dd > span:last-child { color: var(--text-3); }
.hours__row.is-today dt, .hours__row.is-today dd > span:last-child { color: var(--link); font-weight: var(--fw-semibold); }
.hours__row.is-today .hours__bar { box-shadow: 0 0 0 2px var(--accent-tint-2); }
/* now: core.js §6 sets --now on today's row, so the tick exists only with JS (the server marks today, not the minute) */
html.js-ready .hours__row.is-today .hours__bar::after {
  content: ""; position: absolute; top: -4px; bottom: -4px; inset-inline-start: calc(var(--now, 0) * 100%); width: 2px; border-radius: 2px; background: var(--ink-950);
}
.hours__axis { display: grid; grid-template-columns: 3.6em minmax(0, 1fr) 6.4em; gap: 12px; margin-top: 8px; font-size: var(--fz-micro); color: var(--text-3); }
.hours__axis > span:nth-child(2) { display: flex; justify-content: space-between; }
.hours__note { display: flex; align-items: flex-start; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: var(--fz-xs); color: var(--text-2); line-height: 1.5; }
.hours__note .ico { width: 18px; height: 18px; flex: none; color: var(--link); margin-top: 1px; }
/* the map card: an abstract blueprint (no tiles, no third-party embed) + real link-outs */
.mapcard { position: relative; overflow: hidden; border-radius: var(--r-l); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--sh-1); }
.mapcard__art { position: relative; height: 190px; background: var(--night-2); }
.mapcard__art svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.map__grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; }
.map__road { fill: none; stroke: rgba(130, 204, 242, .32); stroke-width: 7; stroke-linecap: round; }
.map__road--s { stroke-width: 3; stroke: rgba(130, 204, 242, .2); }
.map__ring { fill: none; stroke: var(--teal-300); stroke-width: 2; opacity: 0; transform-origin: center; transform-box: fill-box; }
.is-live .map__ring { animation: mapRing var(--beat) var(--e-out) infinite; }
@keyframes mapRing { 0% { transform: scale(.4); opacity: .9; } 40%, 100% { transform: scale(2.6); opacity: 0; } }
.mapcard__pin { position: absolute; inset-inline-start: 50%; top: 50%; width: 54px; height: 54px; transform: translate(50%, -64%); filter: drop-shadow(0 12px 14px rgba(0, 0, 0, .45)); }
.mapcard__pin svg { width: 100%; height: 100%; overflow: visible; }
.mapcard__body { display: grid; gap: 10px; padding: 18px 20px 20px; }
.mapcard__body strong { font: var(--fw-semibold) 1.12rem/1.3 var(--f-display); color: var(--text); }
.mapcard__body .cluster { --cluster-gap: 8px; }
.notice--store { margin-bottom: 18px; }
html.a11y-contrast :is(.chan__card, .hours, .mapcard) { background: #fff; border: 2px solid #000; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
html.a11y-contrast :is(.mapcard__art) { background: #000 !important; border-color: #fff; }
html.a11y-contrast .hours__win rect { fill: #000; }
html.a11y-contrast .hours__bar { box-shadow: inset 0 0 0 1px #000; }
@media (forced-colors: active) {
  .hours__win rect { fill: CanvasText; }
}
@media (max-width: 1180px) {
  .chan { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .cgrid { grid-template-columns: minmax(0, 1fr); }
  .cgrid__aside { position: static; }
}
@media (max-width: 640px) {
  /* two cards per row while a card has at least 10.5 rem (its number, address and button fit), else one: 2 × 2 from about
     390 px at normal text, one column on smaller phones or at large text — never wider than the screen */
  .chan { grid-template-columns: repeat(auto-fit, minmax(min(100%, max(10.5rem, calc((100% - 10px) / 2))), 1fr)); gap: 10px; }
  .chan__card { padding: 16px 14px; }
  .chan__card p { display: none; }
  .hours__row { grid-template-columns: 3.2em minmax(0, 1fr); gap: 10px; }
  .hours__axis { grid-template-columns: 3.2em minmax(0, 1fr) 6.4em; gap: 10px; }
  /* the bars are too short for five labels: keep 0:00 · 12:00 · 24:00, at the same positions */
  .hours__axis > span:nth-child(2) > span:nth-child(even) { visibility: hidden; }
}
