/* ──────────────────────────────────────────────────────────────────────
   "Which side is the Width, the Depth and the Height" (2026-11-14): the box drawing and the three lines under it.
   Markup: views/partials/dimension-guide.ejs. Used on the Staff product form, the Staff 3D Generator (its "How to measure" box and its photo
   guide window) and the customer "?" 3D guide window. Tokens carry fallbacks so the same file works on the customer pages and the Staff pages.
   The drawing is a fixed 230 x 150 box: it never grows past 250px, so it fits a 320px phone with room to spare.
   ────────────────────────────────────────────────────────────────────── */
.dg {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
}
.dg-svg {
  display: block;
  width: 100%;
  max-width: 250px;
  height: auto;
  margin: 0 auto;
}
.dg-svg .dg-front { fill: #fff; stroke: var(--color-primary-dark, #A8845E); stroke-width: 1.5; }
.dg-svg .dg-top { fill: var(--color-primary-xlight, #F5EDE0); stroke: var(--color-primary-dark, #A8845E); stroke-width: 1.5; }
.dg-svg .dg-side { fill: var(--color-primary-light, #E8D5BC); stroke: var(--color-primary-dark, #A8845E); stroke-width: 1.5; }
.dg-svg .dg-arrow { stroke: var(--color-charcoal, #2C2418); stroke-width: 1.3; fill: none; }
.dg-svg text { font: 600 11px var(--font-body, system-ui, sans-serif); fill: var(--color-charcoal, #2C2418); }
.dg-svg .dg-front-word { font-weight: 500; font-size: 9px; letter-spacing: 0.14em; fill: var(--color-brown-light, #B08060); }

.dg-list {
  margin: 0;
  padding-left: 16px;
  font-size: var(--fs-xs, 0.75rem);
  line-height: 1.55;
  color: var(--color-brown-mid, #7A5C44);
  overflow-wrap: anywhere;
}
.dg-list li { margin-bottom: 4px; }
.dg-list li:last-child { margin-bottom: 0; }
.dg-list strong { color: var(--color-charcoal, #2C2418); }

/* a roomy container (a wide card, the guide windows): the drawing and the words side by side */
@media (min-width: 576px) {
  .dg--side { grid-template-columns: 220px minmax(0, 1fr); gap: 16px; }
  .dg--side .dg-svg { margin: 0; }
}

/* ── Staff product form (views/admin/product-form.ejs) ───────────────────────────────────────────
   The shared "Dimensions & Weight" card shows the drawing in a cream box above the inputs; each Version panel has the same drawing in a
   folded-open <details> (filled in by fillDimGuide() in that page's script). */
.pf-dim-guide {
  margin: 0 0 var(--space-4, 1rem);
  padding: 12px 14px;
  background: var(--color-primary-xlight, #F5EDE0);
  border: 1px solid var(--border-light, #EDE0CE);
  border-radius: var(--radius-md, 8px);
}
.pf-dim-guide > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  cursor: pointer;
  list-style: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary-dark, #A8845E);
}
.pf-dim-guide > summary::-webkit-details-marker { display: none; }
.pf-dim-guide > summary::after {
  content: "\F282";
  font-family: "bootstrap-icons";
  margin-left: auto;
  font-size: 0.7rem;
  transition: transform 0.15s ease;
}
.pf-dim-guide[open] > summary { margin-bottom: 8px; }
.pf-dim-guide[open] > summary::after { transform: rotate(180deg); }
@media (max-width: 575.98px) {
  .pf-dim-guide > summary { min-height: 44px; }
}

/* ── Customer "?" 3D guide window (views/partials/viewer-help.ejs) ─────────────────────────────── */
.vh-measure .dg { margin-top: 2px; }
