/* Delivery timer: a live countdown shared by the site (portal + studio) and the phone app. */
.bw-timer { padding: 22px 26px; gap: 12px; position: relative; overflow: hidden; }
.bw-timer::before { /* a thin ember/emerald rail on the left, colored by how much time is left */
  content: ""; position: absolute; inset: 0 auto 0 0; width: 4px;
  background: var(--tm-tone, var(--color-accent-2-500));
}
.bw-timer[data-tone="close"] { --tm-tone: var(--color-accent-500, var(--color-accent)); }
.bw-timer[data-tone="over"] { --tm-tone: var(--color-accent-700, var(--color-accent)); }
.bw-timer.tm-wait, .bw-timer.tm-empty { --tm-tone: var(--color-neutral-400, #6b6060); }

.tm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tm-label { font-family: var(--font-heading); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-muted, var(--color-neutral-600)); }
.tm-edit { margin-left: auto; padding: 4px 14px; min-height: 0; font-size: 13px; }

.tm-clock { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.tm-seg {
  display: inline-flex; align-items: baseline; gap: 3px; padding: 8px 12px 6px;
  border-radius: 10px; background: color-mix(in srgb, var(--color-bg) 70%, transparent);
  box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--tm-tone, var(--color-accent-2-500)) 55%, transparent);
}
.tm-seg b { font-family: var(--font-heading); font-weight: 600; font-size: clamp(26px, 4.2vw, 36px); line-height: 1; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.tm-seg i { font-style: normal; font-size: 13px; color: var(--color-text-muted, var(--color-neutral-600)); }
.tm-static .tm-seg b { min-width: 0; }
.bw-timer[data-tone="over"] .tm-seg b { color: var(--color-accent-300, var(--color-accent)); }

.tm-bar { height: 8px; border-radius: 2px; background: color-mix(in srgb, var(--color-bg) 70%, transparent); overflow: hidden; }
.tm-bar i { display: block; height: 100%; transform-origin: left; background: var(--tm-tone, var(--color-accent-2-500)); transition: transform 1s linear; }
.tm-foot { margin: 0; font-size: 13px; }
.tm-foot b { color: var(--color-text); }

.tm-input { display: flex; gap: 8px; }
.tm-input input { flex: 1; min-width: 0; }
.tm-input select { flex: 0 0 auto; width: auto; }

.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--color-accent-700, var(--color-accent)); text-decoration: underline; cursor: pointer; }

/* phone app: tighter */
.phone .bw-timer, #phone .bw-timer { padding: 16px 18px; gap: 10px; }
#phone .tm-seg { padding: 6px 9px 5px; }
#phone .tm-seg b { font-size: 24px; }

@media (prefers-reduced-motion: reduce) { .tm-bar i { transition: none; } }
