/* Compact Equipment Sales — the store line + Email / Call / Map under each machine (app/where.js), and the window they open.
   Self-contained: the homepage, the app and the WordPress store pages all load it, so it carries its own copies of the colours. */
.where, .wd {
  --w-bg: #0e0e0d; --w-panel: #161615; --w-raised: #232321; --w-raised-hi: #2e2d2a;
  --w-line: rgba(255, 246, 230, .08); --w-line-2: rgba(255, 246, 230, .15);
  --w-text: #f4f2ed; --w-muted: #aba79e; --w-red: #e2261c; --w-red-fill: #d3211b; --w-red-text: #ff5d52;
  --w-display: "DIN Condensed", "Bahnschrift Condensed", "Bahnschrift", "Roboto Condensed", "Arial Narrow", sans-serif;
  --w-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---- the row */
.where { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; color: var(--w-text); }
.w-at { display: inline-flex; align-items: center; gap: 6px; min-width: 0; color: var(--w-muted); font: 600 13px/1.2 var(--w-sans); }
.w-at > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-at .ui-i { flex: none; width: 15px; height: 15px; color: var(--w-red); }
.w-pre, .w-lg { display: none; }
.w-btns { display: flex; flex: none; gap: 6px; }
.w-b {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-width: 38px; height: 38px; padding: 0; box-sizing: border-box;
  border-radius: 10px; border: 1px solid var(--w-line-2); background: var(--w-raised); color: var(--w-text);
  font: 600 13px/1 var(--w-sans); text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background 160ms, border-color 160ms;
}
.w-b:hover { background: var(--w-raised-hi); border-color: rgba(226, 38, 28, .55); }
.w-b:focus-visible, .wd :focus-visible { outline: 2px solid var(--w-red); outline-offset: 2px; }
.w-b .ui-i { flex: none; width: 18px; height: 18px; }
.w-l { display: none; }

/* in a grid card (machines.html). Two cards a row on a phone: the stock line gets its own line, the buttons share the next */
.card .w-card { margin: 0 14px; padding: 10px 0 12px; border-top: 1px solid var(--w-line); }
@media (max-width: 559px) {
  .card .w-card { flex-wrap: wrap; row-gap: 8px; }
  .card .w-card .w-at { flex: 1 1 100%; }
  .card .w-card .w-btns { flex: 1 1 100%; }
  .card .w-card .w-b { flex: 1; }
}
/* under a homepage card */
.card-w { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.card-w > .card { flex: 1; }
.w-home { padding: 7px 7px 7px 12px; border-radius: 14px; background: var(--w-panel); border: 1px solid var(--w-line); }

/* on a machine page: the store spelled out, buttons with words — phones get the short version */
.w-pdp { margin-top: 8px; gap: 12px; justify-content: flex-start; }
.w-pdp .w-at { font-size: 14px; }
.w-pdp .w-b { padding: 0 12px 0 10px; height: 36px; background: none; color: var(--w-muted); }
.w-pdp .w-b:hover { background: var(--w-raised); color: var(--w-text); }
@media (min-width: 760px) {
  .w-pdp .w-pre, .w-pdp .w-lg { display: inline; }
  .w-pdp .w-sh { display: none; }
  .w-pdp .w-l { display: inline; }
}
@media (max-width: 759px), (max-height: 631px) and (orientation: landscape) {
  .w-pdp { margin: 0; justify-content: space-between; }
  .w-pdp .w-pre, .w-pdp .w-lg, .w-pdp .w-l { display: none; }
  .w-pdp .w-sh { display: inline; }
  .w-pdp .w-b { width: 44px; padding: 0; background: var(--w-raised); color: var(--w-text); }
}
@media (max-height: 631px) and (orientation: landscape) { .w-pdp .w-b { height: 34px; } }

/* ---- the window: centred on computers, a sheet from the bottom on phones */
.wd { position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px; background: rgba(8, 8, 7, .74); }
.wd[hidden] { display: none; }
body.wd-on { overflow: hidden; }
.wd-in {
  width: min(520px, 100%); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; box-sizing: border-box;
  border-radius: 18px; background: var(--w-panel); border: 1px solid var(--w-line-2); color: var(--w-text);
  font: 400 15px/1.45 var(--w-sans); box-shadow: 0 24px 64px rgba(0, 0, 0, .55);
}
.wd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--w-line); }
.wd-head h2 { position: relative; margin: 0; padding-left: 14px; font: 700 28px/1 var(--w-display); letter-spacing: .02em; text-transform: uppercase; }
.wd-head h2::before { content: ""; position: absolute; left: 0; top: 2px; bottom: 5px; width: 4px; border-radius: 1px; background: var(--w-red); }
.wd-sub { margin: 6px 0 0 14px; color: var(--w-muted); font-size: 14px; }
.wd-x { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--w-line-2); background: var(--w-raised); color: var(--w-text); cursor: pointer; }
.wd-x:hover { background: var(--w-raised-hi); }
.wd-x .ui-i { width: 18px; height: 18px; }
.wd-body { display: grid; gap: 14px; padding: 16px 18px 20px; }
.wd .ui-i { flex: none; }

.wd-tabs { display: flex; gap: 6px; }
.wd-tabs button { flex: 1; min-width: 0; height: 40px; border-radius: 10px; border: 1px solid var(--w-line-2); background: none; color: var(--w-muted); font: 600 14px/1 var(--w-sans); cursor: pointer; }
.wd-tabs button[aria-pressed="true"] { background: rgba(226, 38, 28, .13); border-color: var(--w-red); color: var(--w-text); }

.wd-big { display: flex; align-items: center; gap: 10px; margin: 2px 0 0; color: var(--w-text); text-decoration: none; font: 700 clamp(28px, 7vw, 40px)/1 var(--w-display); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.wd-big .ui-i { width: 26px; height: 26px; color: var(--w-red); }
.wd-big span { min-width: 0; overflow-wrap: anywhere; }
.wd-mail { font-size: clamp(22px, 5.4vw, 30px); letter-spacing: .01em; }
a.wd-big:hover span { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.wd-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.wd-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; box-sizing: border-box; border-radius: 10px;
  border: 1px solid var(--w-line-2); background: var(--w-raised); color: var(--w-text); font: 600 15px/1 var(--w-sans); text-decoration: none; cursor: pointer;
}
.wd-btn:hover { background: var(--w-raised-hi); }
.wd-btn .ui-i { width: 18px; height: 18px; }
.wd-btn.red { background: var(--w-red-fill); border-color: transparent; color: #fff; }
.wd-btn.red:hover { background: var(--w-red); }
.wd-btn[disabled] { opacity: .6; cursor: default; }

.wd-addr { display: grid; gap: 6px; }
.wd-addr b { font: 700 22px/1 var(--w-display); letter-spacing: .03em; text-transform: uppercase; }
.wd-addr span { color: var(--w-text); }
.wd-hours { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--w-bg); border: 1px dashed var(--w-line-2); color: var(--w-muted); font-size: 14px; }
.wd-map { aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px solid var(--w-line); background: var(--w-raised); }
.wd-map iframe { display: block; width: 100%; height: 100%; border: 0; }

.wd-form { display: grid; gap: 10px; margin-top: 2px; padding-top: 16px; border-top: 1px solid var(--w-line); }
.wd-form h3 { margin: 0; color: var(--w-muted); font: 700 18px/1 var(--w-display); letter-spacing: .05em; text-transform: uppercase; }
.wd-form label { display: grid; gap: 5px; color: var(--w-muted); font-size: 13px; }
.wd-form input, .wd-form textarea {
  width: 100%; box-sizing: border-box; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--w-line-2);
  background: var(--w-bg); color: var(--w-text); font: 400 16px/1.35 var(--w-sans);
}
.wd-form textarea { min-height: 96px; resize: vertical; }
.wd-form input:focus, .wd-form textarea:focus { border-color: var(--w-red); outline: none; }
.wd-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wd-note { margin: 0; color: var(--w-muted); font-size: 14px; }
.wd-note:empty { display: none; }
.wd-note.bad { color: var(--w-red-text); }
.wd-note a { color: var(--w-text); }
.wd-done { display: flex; align-items: center; gap: 10px; margin: 0; padding: 14px; border-radius: 12px; background: rgba(226, 38, 28, .1); border: 1px solid rgba(226, 38, 28, .45); }
.wd-done .ui-i { width: 22px; height: 22px; color: var(--w-red); }

@media (max-width: 599px) {
  .wd { place-items: end stretch; padding: 0; }
  .wd-in { width: 100%; max-height: 92dvh; border-radius: 18px 18px 0 0; padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: no-preference) {
  .wd:not([hidden]) .wd-in { animation: wd-up 200ms cubic-bezier(.2, .7, .2, 1); }
  @keyframes wd-up { from { transform: translateY(12px); opacity: 0; } }
}
@media print { .where, .wd { display: none !important; } }
