/*
 * Light Bulb Color Visualizer — the panels side by side, the steps and chips. Source: sites/dreamy-tools/tools/
 * light-bulb-color-visualizer/tool.css (Dash repo); loaded after core/tools.css on this tool only.
 * ⚠️ Every input/select/button stays ≥ 16px (iPhone zooms the page on a smaller field — fenced); tap targets ≥ 44px.
 */
.lb { display: grid; grid-template-columns: 1fr; gap: 18px; }
.lb > * { min-width: 0; }
.lb-stage { position: relative; border-radius: 20px; padding: 10px; background: radial-gradient(120% 90% at 50% 0%, #f6f1e8 0%, #e9e1d4 100%); }
.lb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.lb-panel {
  font: inherit; font-size: 16px; color: var(--chqt-ink); display: flex; flex-direction: column; gap: 6px; padding: 6px; margin: 0;
  min-height: 44px; min-width: 0; cursor: pointer; text-align: left; border: 2px solid transparent; border-radius: 14px; background: #fffdf9;
  box-shadow: 0 8px 22px rgba(43, 37, 34, .16);
}
.lb-panel[aria-pressed="true"] { border-color: var(--chqt-ink); box-shadow: 0 0 0 3px rgba(215, 157, 50, .55), 0 10px 26px rgba(43, 37, 34, .22); }
.lb-panel:focus-visible { outline: 3px solid rgba(215, 157, 50, .8); outline-offset: 2px; }
.lb-shot { display: block; width: 100%; aspect-ratio: var(--lb-ratio, 2 / 3); border-radius: 9px; overflow: hidden; background: #e9e1d4; }
.lb-canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-cap { display: flex; flex-direction: column; gap: 1px; line-height: 1.25; padding: 0 2px 2px; }
.lb-cap b { font-size: 17px; font-variant-numeric: tabular-nums; }
.lb-cap small { font-size: 13.5px; color: var(--chqt-muted); }
.lb-hint {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%); margin: 0; z-index: 2; padding: 8px 14px;
  border-radius: 999px; background: rgba(20, 16, 14, .72); color: #fff; font-size: 14.5px; line-height: 1.3; font-weight: 600;
  text-align: center; width: max-content; max-width: calc(100% - 32px); pointer-events: none; transition: opacity .35s;
}
.lb-hint--off { opacity: 0; }
.lb-stage.lb-busy .lb-grid { opacity: .55; }
.lb-note { margin: 10px 4px 0; font-size: 14.5px; color: var(--chqt-muted); }
.lb-side { display: flex; flex-direction: column; gap: 14px; }
.lb-step { background: var(--chqt-cream); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lb-step .chqt-hint { margin: 0; }
.lb-h { margin: 0; font-weight: 700; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.lb-h small { font-weight: 400; color: var(--chqt-muted); font-size: 14.5px; }
.lb-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--chqt-ink); color: #fff; font-size: 14.5px; }
.lb-upload { align-self: flex-start; }
.lb-step input { font-size: 16px; } /* the hidden file picker: an input does not inherit it, and under 16px iPhone zooms */
.lb-samples, .lb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.lb-samples .chqt-btn[aria-pressed="true"] { background: var(--chqt-ink); color: #fff; }
.lb-chip {
  font: inherit; font-size: 16px; min-height: 44px; min-width: 44px; padding: 6px 12px; cursor: pointer; border-radius: 999px;
  border: 1.5px solid var(--chqt-line); background: #fff; color: var(--chqt-ink); font-variant-numeric: tabular-nums;
}
.lb-chip[aria-pressed="true"] { background: var(--chqt-ink); border-color: var(--chqt-ink); color: #fff; }
.lb-chip:focus-visible { outline: 3px solid rgba(215, 157, 50, .8); outline-offset: 2px; }
.lb .chqt-actions { margin-top: 0; }
/* the answer here is a sentence of names, not a number: the core's display size would run it to four lines */
.lb .chqt-answer { font-size: clamp(21px, 2.3vw, 27px); line-height: 1.25; }
@media (min-width: 560px) and (max-width: 859px) { .lb-grid { grid-template-columns: repeat(var(--lb-n, 4), minmax(0, 1fr)); } }
@media (max-width: 859px) {
  .chqt[data-tool="light-bulb-color-visualizer"] { padding: 12px; }
  .lb-stage { padding: 0; background: none; }
  .lb-grid { gap: 8px; }
  .lb-hint { top: 8px; }
}
/* desktop last, so it wins over the phone-first rules above at the same specificity: the bulbs 2 × 2 on the left (sticky), the
   answer at the top of the right column and the steps under it — the live header pushed an answer placed under a row of
   panels to 960 px, past a 900 px screen (the production gate, 2026-10-04) */
@media (min-width: 860px) {
  .lb { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 26px; align-items: start; }
  .lb-main { position: sticky; top: 16px; }
  .lb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-side > .chqt-result { order: -1; margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) { .lb-hint { transition: none; } }
