/* balatat.com — Stores. Page styles on top of shared/theme.css (the Dial theme).
   Maps: ink lines on the light tinted wash, water as paper white, the route and the pin in maroon. */

/* ───────── shop cards ───────── */
.s-grid { display: grid; gap: 16px; margin-block-start: 18px; }
.s-shop { display: flex; flex-direction: column; min-width: 0; border-radius: var(--r-card); overflow: hidden; background: var(--surface); box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .06); }
.ka-js .s-shop { opacity: 0; transform: translateY(22px); transition: opacity .6s, transform .9s var(--ease); }
.ka-js .s-shop.is-in { opacity: 1; transform: none; }

.s-mapbox { position: relative; }
.s-map { position: relative; aspect-ratio: 4 / 3.9; overflow: hidden; direction: ltr; background: var(--wash); cursor: pointer; border-radius: var(--r-card) var(--r-card) 0 0; -webkit-user-select: none; user-select: none; }
.s-map svg.city { position: absolute; inset: 0; width: 100%; height: 100%; }
.s-hud { position: absolute; z-index: 2; inset-inline: 14px 6px; inset-block-start: 6px; display: flex; justify-content: space-between; align-items: center; pointer-events: none; }
.s-coord { font-size: 10.5px; line-height: 1; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.s-replay { pointer-events: auto; position: relative; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); }
.s-replay::before { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: rgba(255, 255, 255, .8); box-shadow: inset 0 0 0 1px var(--line); }
.s-replay svg { position: relative; transition: transform .6s var(--ease); }
.s-replay:active svg { transform: rotate(-90deg); }

/* layer 1: streets (static) */
.city .streets path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.city .s-path { stroke: rgba(21, 23, 28, .1); stroke-width: 1.3; }
.city .s-minor { stroke: rgba(21, 23, 28, .16); stroke-width: 2.4; }
.city .s-major { stroke: rgba(21, 23, 28, .24); stroke-width: 4.6; }
.city .streets .s-bld { fill: rgba(21, 23, 28, .045); stroke: rgba(21, 23, 28, .07); stroke-width: .8; }
.city .streets .s-water { fill: rgba(255, 255, 255, .78); }
.city .s-coast { stroke: rgba(21, 23, 28, .26); stroke-width: 1.6; }
.city .streets .s-apron { fill: rgba(21, 23, 28, .03); stroke: rgba(21, 23, 28, .12); stroke-width: 1.2; }
.city .streets .s-term { fill: rgba(255, 255, 255, .7); stroke: rgba(21, 23, 28, .42); stroke-width: 2; }
.city .s-gate { stroke: rgba(21, 23, 28, .3); stroke-width: 1.6; }
/* layer 2: what moves */
.city .bolt path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.city .b-trail { stroke: var(--maroon); stroke-width: 3; opacity: 0; }
.city .b-glow { stroke: var(--maroon); stroke-width: 18; opacity: 0; }
.city .b-head { stroke: var(--maroon); stroke-width: 6; opacity: 0; }
.city .b-halo { stroke: var(--maroon); stroke-width: 14; opacity: 0; }
.city .pin-ring { fill: none; stroke: var(--maroon); stroke-width: 2.5; opacity: 0; }
.city .pin-core { fill: var(--maroon); stroke: #fff; stroke-width: 3; }
.city .pin-dot { fill: #fff; }
.city .flash { opacity: 0; }
.city .pin, .city .pin-ring, .city .flash { transform-box: view-box; }
.city .pin { transform: scale(0); }
.city .mark { opacity: 0; }
.city .walk { fill: none; stroke: var(--ink); stroke-width: 3; stroke-dasharray: 2 9; stroke-linecap: round; opacity: .4; }
.city .mark-bg { fill: var(--ink); stroke: #fff; stroke-width: 3; }
.city .mark-p { font-family: var(--font); font-size: 21px; font-weight: 600; fill: #fff; }
.city .walkbolt .b-trail, .city .walkbolt .b-head { stroke: var(--ink); }
.city .walkbolt .b-glow { stroke: var(--ink); }

/* pills over the map (anchored to the pin by stores.js) */
.pin-labels, .park-labels { position: absolute; z-index: 1; width: 0; height: 0; pointer-events: none; }
.ptag, .pnote { white-space: nowrap; opacity: 0; border-radius: 999px; background: rgba(255, 255, 255, .94); box-shadow: inset 0 0 0 1px var(--line), 0 2px 8px rgba(21, 23, 28, .06); }
.ptag { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 22px)); padding: 7px 12px; font-size: 10px; line-height: 1; font-weight: 500; letter-spacing: .16em; color: var(--maroon); }
.pnotes { position: absolute; left: 0; top: 22px; transform: translateX(-50%); display: grid; justify-items: center; gap: 5px; }
.pnote { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px 6px 9px; font-size: 11px; line-height: 1; font-weight: 400; color: var(--ink); }
:lang(ar) .pnote { line-height: 1.35; padding-block: 4px; }
.pnote::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--maroon); }
.pnote.place::before { background: none; box-shadow: inset 0 0 0 1px var(--ink-2); }
.pnote.park::before { background: var(--ink); }
/* side="right": everything to the right of the pin (over the water at Mina) */
.pin-labels.right .ptag { transform: translate(30px, calc(-100% - 5px)); }
.pin-labels.right .pnotes { left: 30px; top: 5px; transform: none; justify-items: start; }
.park-labels .pnote { position: absolute; opacity: 1; transform: translate(-50%, calc(-100% - 26px)); }
.cletter { position: absolute; z-index: 1; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; line-height: 1; font-weight: 600; color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .3); opacity: 0; pointer-events: none; }

/* text under the map */
.s-info { flex: 1; display: flex; flex-direction: column; padding: 16px 18px 18px; }
.s-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 20px; }
.s-city { font-size: 11.5px; line-height: 1.5; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.s-name { margin-block-start: 4px; font-size: 26px; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; text-wrap: balance; }
:lang(ar) .s-name { line-height: 1.5; }
.s-addr { margin-block-start: 2px; font-size: 15px; color: var(--ink-2); }
.s-info .pills { margin-block-start: 12px; }
.s-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: auto; padding-block-start: 18px; }
.s-actions .btn { flex: 1 1 0; min-width: max-content; }
.s-actions .btn-s { padding-inline: 14px; gap: 7px; }
.s-actions .s-wide { flex-basis: 100%; }
.s-actions svg:not(.wa) { flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.s-actions .wa { width: 16px; height: 16px; }
.s-credit { margin-block-start: 14px; }
.s-credit .link { display: inline-block; padding-block: 13px; margin-block: -13px; }

/* collaboration */
.s-collab { padding-block-end: 64px; }
.s-collab-card { display: grid; gap: 20px; }
.s-collab-card .h2 { margin-block: 6px 8px; }
.s-collab-note { max-width: 32em; color: var(--ink-2); }

/* ───────── sheets ───────── */
.s-sheet { position: fixed; inset: auto 0 0 0; width: 100%; max-width: 100%; max-height: 92vh; max-height: 92dvh; margin: 0; padding: 0; border: 0; border-radius: 24px 24px 0 0; background: #fff; color: var(--ink); overflow: auto; overscroll-behavior: contain; box-shadow: 0 -10px 40px rgba(21, 23, 28, .12); }
.s-sheet::backdrop { background: rgba(21, 23, 28, .34); }
.s-sheet[open] { animation: s-up .5s var(--ease) both; }
.s-sheet[open]::backdrop { animation: s-fade .3s linear both; }
@keyframes s-up { from { transform: translateY(40px); opacity: 0; } }
@keyframes s-fade { from { opacity: 0; } }
.s-sheet-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
.s-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.s-sheet-head h2 { font-size: 20px; line-height: 1.3; font-weight: 500; letter-spacing: -.015em; padding-block-start: 8px; }
.s-sheet-head p { font-size: var(--fs-s); color: var(--ink-2); }
.s-x { flex: none; width: 44px; height: 44px; margin-inline-end: -8px; display: grid; place-items: center; }
.s-sheet-note { margin-block-start: 10px; font-size: 14px; color: var(--ink-2); max-width: 34em; }
.s-label { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-block: 18px 8px; font-size: 11.5px; line-height: 1.5; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.s-label em { font-style: normal; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--ink); }
.s-days { display: flex; gap: 6px; margin-inline: -16px; padding: 2px 16px 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.s-days::-webkit-scrollbar { display: none; }
.s-chip { flex: none; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .16); color: var(--ink); transition: background-color .2s, color .2s, box-shadow .2s, transform .12s; }
.s-chip:active { transform: scale(.95); }
.s-chip[aria-checked="true"] { background: var(--ink); color: #fff; box-shadow: none; }
.s-chip:disabled { color: var(--ink-3); box-shadow: inset 0 0 0 1px var(--line); cursor: default; }
.s-day { display: grid; justify-items: center; align-content: center; gap: 1px; width: 58px; height: 72px; }
.s-day .dow, .s-day .mon { font-size: 10.5px; line-height: 1.3; opacity: .72; white-space: nowrap; }
.s-day .dnum { font-size: 20px; line-height: 1.15; font-weight: 500; font-variant-numeric: tabular-nums; }
.s-times { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.s-time { height: 44px; border-radius: 999px; font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.s-time:disabled { text-decoration: line-through; }
.s-tz { margin-block-start: 8px; font-size: var(--fs-xs); color: var(--ink-2); }
.s-send { width: 100%; margin-block-start: 18px; padding-inline: 12px; gap: 7px; font-size: 14px; letter-spacing: -.01em; }
.s-send span { overflow: hidden; text-overflow: ellipsis; }
.s-send[aria-disabled="true"] { background: var(--wash); color: var(--ink-2); cursor: default; }
.s-send[aria-disabled="true"]:active { transform: none; }
.s-field { display: block; }
.s-field .s-label { margin-block: 14px 6px; }
.s-field input, .s-field textarea { display: block; width: 100%; margin: 0; padding: 12px 16px; border: 0; border-radius: 16px; -webkit-appearance: none; appearance: none; background: #fff; box-shadow: inset 0 0 0 1px rgba(21, 23, 28, .22); font-family: var(--font); font-size: 16px; line-height: 1.4; color: var(--ink); resize: vertical; }
.s-field input { height: 48px; }
.s-field input::placeholder, .s-field textarea::placeholder { color: var(--ink-3); opacity: 1; }
.s-field input:focus, .s-field textarea:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--ink); }
[dir="rtl"] .s-field input[dir="ltr"] { text-align: right; }
@media (max-width: 374px) { .s-time { font-size: 12px; } .s-send { font-size: 13.5px; } }

/* ───────── tablet / desktop ───────── */
@media (min-width: 700px) {
  .s-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-block-start: 28px; }
  .s-map { aspect-ratio: 4 / 3.5; }
  .s-info { padding: 20px 24px 24px; }
  .s-name { font-size: 28px; }
  .s-collab-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; }
  .s-sheet { inset: 0; width: min(520px, calc(100% - 80px)); height: -moz-fit-content; height: fit-content; margin: auto; border-radius: 24px; box-shadow: 0 20px 60px rgba(21, 23, 28, .16); }
  .s-sheet-in { padding: 20px 28px 28px; }
  .s-days { margin-inline: -28px; padding-inline: 28px; scrollbar-width: thin; }
}
@media (min-width: 1000px) {
  .s-grid { gap: 24px; }
  .s-map { aspect-ratio: 4 / 3.2; }
  .s-info { padding: 24px 28px 28px; }
}
@media (min-width: 1180px) {
  .s-actions .btn { flex: 0 1 auto; }
  .s-actions .s-wide { flex-basis: auto; }
}
/* label positions are measured right after they are set: no transition may sit in between (the global
   reduced-motion rule gives every element a 0.01 ms one, which is enough to make the measurement stale) */
.s-map .ptag, .s-map .pnote, .s-map .pnotes, .pin-labels, .park-labels, .cletter { transition: none !important; }
