/* Business info (src/templates/business-block.ts): the open-now badge, the
   address, call and email buttons, the optional map and the week's hours.
   Loaded only on pages that show it. Colors come from the theme; each
   template restyles the block through its own class at the bottom. */

.biz { min-width: 0; container-type: inline-size; }
.biz-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; }
.biz-h { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.01em; line-height: 1.3; }
.biz-sub { margin: 0 0 8px; font-size: 12px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* The badge: a dot and a few words, green-ish when open, muted when closed. */
.biz-now {
  --ok: color-mix(in srgb, #1f9d55 82%, var(--text));
  display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 5px 12px 5px 10px;
  border-radius: 999px; font-size: 13.5px; font-weight: 600; line-height: 1.3;
  background: var(--raised); color: var(--muted);
}
.biz-now i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.biz-now.is-open { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.biz-now.is-open i { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 50%, transparent); animation: biz-pulse 2.4s ease-out infinite; }
@keyframes biz-pulse { 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .biz-now.is-open i { animation: none; } }

.biz-body { display: grid; gap: 20px; margin-top: 16px; min-width: 0; }
@container (min-width: 560px) {
  .biz-two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; align-items: start; }
}
.biz-info { display: grid; gap: 14px; min-width: 0; }
/* Address and buttons only (no map, no hours beside it): side by side once there is room, so the card stays short. */
@container (min-width: 440px) {
  .biz-body:not(.biz-two) > .biz-info:not(:has(.biz-map)):has(.biz-addr + .biz-actions) { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; }
  .biz-body:not(.biz-two) > .biz-info:not(:has(.biz-map)) > .biz-addr + .biz-actions { flex-direction: column; align-items: stretch; }
}
.biz-addr { display: grid; gap: 1px; font-style: normal; line-height: 1.45; overflow-wrap: anywhere; }
.biz-addr strong { font-weight: 650; }
.biz-addr span { color: var(--text); }

.biz-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.biz-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 42px; max-width: 100%; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--text);
  font-size: 14.5px; font-weight: 600; text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: border-color .2s, transform .25s var(--ease);
}
.biz-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.biz-btn svg { flex: none; color: var(--accent); }
.biz-btn-maps { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.biz-btn-maps svg { color: var(--on-accent); }
@media (hover: hover) { .biz-btn:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); } .biz-btn-maps:hover { filter: brightness(1.06); } }
.biz-btn:active { transform: scale(.97); }
.biz-btn:focus-visible, .biz-map:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* The map: nine 256px tiles, shifted so the pin's point is at the center. */
.biz-map { position: relative; display: block; height: 168px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--raised); }
.biz-map-tiles {
  position: absolute; left: 50%; top: 50%; display: grid; grid-template-columns: repeat(3, 256px); width: 768px;
  transform: translate(calc(-256px - var(--px)), calc(-256px - var(--py)));
}
.biz-map-tiles img { display: block; width: 256px; height: 256px; color: transparent; }
.is-dark .biz-map-tiles { filter: brightness(.82) contrast(1.05); }
.biz-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -92%); color: var(--accent); filter: drop-shadow(0 2px 3px rgb(0 0 0 / .35)); }
.biz-pin svg { fill: var(--card); }
.biz-attr { margin: -8px 0 0; font-size: 11px; color: var(--muted); }
.biz-attr a { color: inherit; }

/* The week: today stands out, closed days are quiet. */
.biz-week { width: 100%; border-collapse: collapse; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.biz-week th, .biz-week td { padding: 5px 0; text-align: left; vertical-align: top; border-bottom: 1px solid var(--hair); }
.biz-week tr:last-child :is(th, td) { border-bottom: 0; }
.biz-week th { width: 1%; white-space: nowrap; font-weight: 500; color: var(--muted); padding-right: 16px; }
.biz-week td { text-align: right; }
.biz-week td.is-closed { color: var(--muted); }
.biz-week .is-today :is(th, td) { color: var(--text); font-weight: 700; }
.biz-week .is-today th::after { content: ' · today'; font-weight: 500; color: var(--muted); }

.biz-special { margin-top: 16px; }
.biz-special ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.biz-special li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.biz-special-d { font-weight: 600; }
.biz-special-t { color: var(--muted); text-align: right; }
.biz-special li.is-now .biz-special-t { color: var(--text); font-weight: 600; }
.biz-note { font-weight: 400; }
.biz-note::before { content: '· '; }
.biz-tz { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }

/* ---- in each template ---- */
.biz-card, .sc-biz, .sp-biz, .st-biz, .tl-biz, .mg-biz, .b-biz { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); }
.glass :is(.biz-card, .sc-biz, .sp-biz, .st-biz, .tl-biz, .mg-biz) { background: color-mix(in srgb, var(--card-solid) 88%, transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.biz-card { margin-top: 4px; }

/* Showcase: a wide band under the header, with a shadow like its cards. */
.sc-biz { margin: 0 0 28px; box-shadow: var(--shadow); }

/* Bento: a full-width tile. */
.b-biz { grid-column: 1 / -1; display: block; }

/* Minimal: no card, hairlines and bigger type. */
.mn-biz { margin: -48px 0 88px; padding: 22px 0; border-top: 1px solid var(--text); border-bottom: 1px solid var(--hair); }
.mn-biz .biz-h { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.mn-biz .biz-btn { border-radius: 0; border-width: 0 0 1px; padding: 0 2px; min-height: 36px; background: none; color: var(--text); }
.mn-biz .biz-btn-maps { color: var(--accent); }
.mn-biz .biz-btn-maps svg { color: var(--accent); }
.mn-biz .biz-now { background: none; padding: 0; }

/* Spotlight: a card before the hero, as wide as the support bar. */
.sp-biz { max-width: 760px; margin: 8px auto 28px; box-shadow: var(--shadow); }

/* Terminal: monospace, dashed like its links, the badge in brackets. */
.tm-biz { max-width: 560px; font-family: var(--mono); }
.tm-biz .biz-h { display: none; }
.tm-biz .biz-body { margin-top: 4px; }
.tm-biz .biz-btn { border-style: dashed; border-radius: var(--r-sm); font-size: 13.5px; font-weight: 500; background: transparent; }
.tm-biz .biz-btn-maps { background: var(--accent); border-style: solid; }
.tm-biz .biz-week { font-size: 13.5px; }
.tm-biz .biz-week th, .tm-biz .biz-week td { border-bottom-style: dashed; }
.tm-biz .biz-map { border-radius: var(--r-sm); border-style: dashed; }
.tm-biz .biz-now { border-radius: var(--r-sm); font-size: 13px; }

/* Studio: the first thing in the work column. */
.st-biz { margin-bottom: 28px; box-shadow: var(--shadow); }

/* Magazine: a ruled band under the masthead, like its support band. */
.mg-biz { margin: 0 0 32px; border-left: 4px solid var(--accent); border-radius: var(--r-sm); box-shadow: var(--shadow); }
.mg-biz .biz-h { font-size: 19px; letter-spacing: -.015em; }

/* Timeline: a card off the rail. */
.tl-biz { margin: 8px 0 28px; }

@container (max-width: 360px) {
  .biz-btn { padding: 0 12px; font-size: 14px; }
  .biz-week .is-today th::after { content: none; }
}
