/* "Design your Spotlight Lamp" page (lamp-designer.html). Uses the brand tokens from styles.css. */
.ld-intro { padding: 40px 0 8px; text-align: center; }
.ld-intro h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 4px 0 8px; }
.ld-intro .tagline-sub { max-width: 640px; margin: 0 auto; }
.ld-section { padding: 16px 0 56px; }
.ld-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px 28px; align-items: start;
  grid-template-areas: "viewer controls" "notes controls"; }
.ld-viewer-wrap { grid-area: viewer; }
.ld-controls { grid-area: controls; }
.ld-notes { grid-area: notes; }

.ld-viewer { position: relative; width: 100%; aspect-ratio: 1 / 1; max-height: 72vh; border-radius: var(--radius);
  overflow: hidden; background: var(--color-cream); box-shadow: var(--shadow-card); touch-action: none; }
.ld-viewer canvas { display: block; width: 100% !important; height: 100% !important; }
.ld-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--color-muted); }
.ld-loading[hidden] { display: none; }
.ld-hint { font-size: 0.85rem; color: var(--color-muted); text-align: center; margin: 8px 0 0; }
.ld-honest { font-size: 0.9rem; background: var(--color-white); border-left: 4px solid var(--color-primary);
  padding: 10px 14px; border-radius: 8px; margin: 12px 0; }
.ld-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.ld-save { background: var(--color-white); color: var(--color-ink); border: 2px solid var(--color-ink); }

.ld-controls { display: flex; flex-direction: column; gap: 16px; }
.ld-step { border: 0; margin: 0; padding: 16px 18px; background: var(--color-white); border-radius: var(--radius);
  box-shadow: var(--shadow-card); min-width: 0; }
.ld-step[hidden] { display: none; }
.ld-step legend { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; padding: 0; float: left;
  width: 100%; margin-bottom: 10px; }
.ld-step legend + * { clear: both; }
.ld-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-primary); color: var(--color-ink); font-size: 0.95rem; margin-right: 6px; }
.ld-small { font-size: 0.85rem; color: var(--color-muted); margin: 6px 0; }

.ld-bases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ld-base { position: relative; cursor: pointer; }
.ld-base input { position: absolute; opacity: 0; }
.ld-base span { display: grid; place-items: center; text-align: center; min-height: 52px; padding: 8px; border-radius: 10px;
  border: 2px solid #e3dccf; font-weight: 600; font-size: 0.92rem; line-height: 1.2; }
.ld-base input:checked + span { border-color: var(--color-ink); background: var(--color-cream); }
.ld-base input:focus-visible + span { outline: 3px solid var(--color-accent-blue); outline-offset: 2px; }

.ld-drop { border: 2px dashed #d6ccbb; border-radius: 10px; padding: 14px; text-align: center; }
.ld-drop p { margin: 2px 0; }
.ld-drop.is-over { border-color: var(--color-accent-blue); background: #f0f8fd; }
.ld-drop.has-logo { border-style: solid; border-color: var(--color-success); }
.ld-file-label { color: var(--color-accent-orange); font-weight: 600; text-decoration: underline; cursor: pointer; }
.ld-file-label input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.ld-logo-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.ld-logo-row[hidden] { display: none; }
.ld-logo-row input[type="range"] { flex: 1; min-width: 120px; }
.ld-link { background: none; border: 0; padding: 0; color: var(--color-accent-orange); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.85rem; }
.ld-colour-note { font-size: 0.88rem; background: #fff3e0; padding: 8px 12px; border-radius: 8px; margin: 10px 0 0; }
.ld-scheme-note { font-size: 0.88rem; background: #eef7ef; padding: 8px 12px; border-radius: 8px; margin: 10px 0 0; }
.ld-privacy { font-size: 0.85rem; margin: 10px 0 0; }
.ld-example-row { font-size: 0.85rem; margin: 8px 0 0; }
.ld-privacy::before { content: "\1F512  "; }

.ld-name { width: 100%; font: inherit; font-size: 1rem; padding: 10px 12px; border: 2px solid #e3dccf; border-radius: 10px; }
.ld-name:focus { outline: none; border-color: var(--color-ink); }

.ld-parts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.ld-part { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; cursor: pointer;
  border: 2px solid #e3dccf; background: var(--color-white); font: inherit; font-size: 0.85rem; font-weight: 600; }
.ld-part[aria-selected="true"] { border-color: var(--color-ink); background: var(--color-cream); }
.ld-dot { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.25); }
.ld-palette-block[hidden] { display: none; }
.ld-palette { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.ld-swatch { aspect-ratio: 1; border-radius: 6px; border: 1px solid rgba(0, 0, 0, 0.2); cursor: pointer; padding: 0; min-width: 0; }
.ld-swatch[aria-pressed="true"] { outline: 3px solid var(--color-ink); outline-offset: 2px; }
.ld-custom { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.ld-custom input { width: 44px; height: 32px; border: 0; padding: 0; background: none; cursor: pointer; }
.ld-next { text-align: center; font-size: 0.95rem; margin: 12px 0 0; }
.ld-next a { color: var(--color-accent-orange); font-weight: 600; }

@media (max-width: 860px) {
  /* phones: the lamp stays pinned under the header while the controls scroll beneath it */
  .ld-layout { grid-template-columns: 1fr; grid-template-areas: "viewer" "controls" "notes"; }
  .ld-viewer-wrap { position: sticky; top: var(--ld-header, 72px); z-index: 5; background: var(--color-cream);
    padding-bottom: 6px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  .ld-viewer { aspect-ratio: auto; height: 42vh; max-height: 380px; }
  .ld-hint { margin-top: 4px; font-size: 0.78rem; }
}
@media (max-width: 420px) {
  .ld-palette { grid-template-columns: repeat(5, 1fr); }
  .ld-base span { font-size: 0.82rem; }
}
.ld-clear-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 0.9rem; font-weight: 600; }
.ld-clear-row[hidden] { display: none; }
.ld-clear-row .ld-swatch { width: 34px; }
.ld-swatch--clear, .ld-dot--clear { background: linear-gradient(135deg, rgba(191, 227, 245, 0.9), rgba(191, 227, 245, 0.35));
  border: 1px dashed #5c9fc4; }

/* Request a quote dialog */
.ld-dialog { border: 0; border-radius: var(--radius); padding: 22px; width: min(480px, calc(100vw - 32px)); box-shadow: var(--shadow-card-hover); }
.ld-dialog::backdrop { background: rgba(26, 26, 26, 0.55); }
.ld-dialog h2 { font-family: var(--font-display); margin: 0 0 6px; font-size: 1.4rem; }
.ld-dialog form[hidden], .ld-sent[hidden] { display: none; }
.ld-field { display: flex; flex-direction: column; gap: 4px; margin: 10px 0; }
.ld-field label { font-weight: 600; font-size: 0.92rem; }
.ld-field input, .ld-field select, .ld-field textarea { font: inherit; padding: 9px 11px; border: 2px solid #e3dccf; border-radius: 10px; }
.ld-field input:focus, .ld-field select:focus, .ld-field textarea:focus { outline: none; border-color: var(--color-ink); }
.ld-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ld-send-note { font-size: 0.85rem; background: var(--color-cream); padding: 8px 12px; border-radius: 8px; }
.ld-form-error { color: #b3261e; font-weight: 600; font-size: 0.9rem; }
.ld-form-error[hidden] { display: none; }
.ld-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }
.ld-cancel { background: var(--color-white); border: 2px solid #e3dccf; }
