/* Design your display — page styles (loaded only on /design-your-display/) */

.designer { background: var(--color-bg-soft); padding-block: var(--spacing-lg) calc(var(--spacing-xl) + 70px); }
.dz { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: var(--spacing-lg); align-items: start; }
@media (max-width: 1020px) { .dz { grid-template-columns: 1fr; } }

/* Keep the drawing in view while the options scroll, but only on screens tall
   enough to show the whole stage (otherwise the size controls become unreachable). */
@media (min-width: 1021px) and (min-height: 900px) { .dz-stage { position: sticky; top: calc(var(--header-h) + 12px); } }

/* Toolbar */
.dz-toolbar { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.45rem; margin-bottom: 0.7rem; }
.dz-toolbar button, .dz-scale [data-tool] { cursor: pointer; }
.dz-toolbar button { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; padding: 0.6rem 0.3rem; border: 1.5px solid #D8D0E0; border-radius: var(--radius-md); background: #fff; font-weight: 700; font-size: 0.86rem; line-height: 1.15; text-align: center; min-height: 64px; }
.dz-toolbar button[aria-pressed="true"] { border-color: var(--jds-red); background: #FFF0EF; color: var(--jds-red); box-shadow: 0 0 0 3px rgba(198, 33, 39, 0.12); }
@media (max-width: 560px) { .dz-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.dz-ico { width: 26px; height: 22px; display: block; background-repeat: no-repeat; background-position: center; background-size: contain; }
.dz-ico--icicle { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M1 3h24' stroke='%23140A20' stroke-width='2'/%3E%3Cg fill='%23F7B52C'%3E%3Ccircle cx='4' cy='7' r='1.6'/%3E%3Ccircle cx='4' cy='11' r='1.6'/%3E%3Ccircle cx='9' cy='7' r='1.6'/%3E%3Ccircle cx='9' cy='11' r='1.6'/%3E%3Ccircle cx='9' cy='15' r='1.6'/%3E%3Ccircle cx='9' cy='19' r='1.6'/%3E%3Ccircle cx='14' cy='7' r='1.6'/%3E%3Ccircle cx='19' cy='7' r='1.6'/%3E%3Ccircle cx='19' cy='11' r='1.6'/%3E%3Ccircle cx='19' cy='15' r='1.6'/%3E%3Ccircle cx='24' cy='7' r='1.6'/%3E%3Ccircle cx='24' cy='11' r='1.6'/%3E%3C/g%3E%3C/svg%3E"); }
.dz-ico--garland { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M1 8c6 8 18 8 24 0' stroke='%23006B36' stroke-width='5' fill='none' stroke-linecap='round'/%3E%3Ccircle cx='7' cy='15' r='2.4' fill='%23C62127'/%3E%3Ccircle cx='13' cy='17' r='2.4' fill='%23F7B52C'/%3E%3Ccircle cx='19' cy='15' r='2.4' fill='%23C62127'/%3E%3C/svg%3E"); }
.dz-ico--tree { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M13 1L20 12h-3l5 7H4l5-7H6z' fill='%23006B36'/%3E%3Crect x='11' y='19' width='4' height='3' fill='%235b2a1a'/%3E%3Ccircle cx='11' cy='10' r='1.5' fill='%23F7B52C'/%3E%3Ccircle cx='15' cy='15' r='1.5' fill='%23C62127'/%3E%3C/svg%3E"); width: 20px; }
.dz-ico--big { width: 28px; }
.dz-ico--wreath { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Ccircle cx='13' cy='11' r='7.5' stroke='%23006B36' stroke-width='4.5' fill='none'/%3E%3Cpath d='M13 17l-4 4 1-5zM13 17l4 4-1-5z' fill='%23C62127'/%3E%3Ccircle cx='13' cy='17' r='1.8' fill='%23C62127'/%3E%3C/svg%3E"); }
.dz-ico--erase { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 22'%3E%3Cpath d='M6 5l14 14M20 5L6 19' stroke='%23140A20' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Canvas */
.dz-canvas-wrap { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #0C1224; min-height: 360px; display: grid; place-items: center; box-shadow: var(--shadow-md); }
.dz-canvas-wrap.is-loaded { min-height: 0; }
.dz-canvas { touch-action: none; cursor: crosshair; max-width: 100%; }
.dz-canvas[hidden] { display: none; }
.dz-empty { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; text-align: center; padding: 2rem 1.5rem; color: var(--color-on-dark); background: radial-gradient(ellipse at 50% 0%, #22306080, transparent 60%), #0C1224; }
.dz-empty h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 2rem); }
.dz-empty p { color: var(--color-on-dark-muted); max-width: 46ch; }
.dz-empty .btn--outline { color: #fff; }
.dz-empty .btn--outline:hover { background: #fff; color: var(--color-text); }
.dz-empty[hidden] { display: none; }
.dz-upload { cursor: pointer; }
.dz-hint { min-height: 1.6em; margin: 0.6rem 0 0.4rem; font-weight: 700; color: var(--color-text); }
.dz-hint::before { content: "✦ "; color: var(--jds-orange); }

.dz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-bottom: 0.8rem; }
.dz-switch { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 700; font-size: 0.95rem; padding: 0 0.4rem; }
.dz-switch input { width: 20px; height: 20px; accent-color: var(--jds-red); }

.dz-scale { display: flex; flex-wrap: wrap; gap: 0.8rem 1.4rem; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--color-line); border-radius: var(--radius-md); padding: 0.9rem 1.1rem; }
.dz-scale__controls { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.dz-scale__controls input { width: 4.8rem; padding: 0.4rem 0.5rem; border: 1.5px solid #CFC7D8; border-radius: var(--radius-sm); }
.dz-scale [data-tool][aria-pressed="true"] { background: var(--color-text); }
.dz-scale.is-unset .dz-scale__status { color: var(--jds-red); font-weight: 700; }

/* Panel */
.dz-panel { display: grid; gap: var(--spacing-md); }
.dz-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 1.3rem 1.4rem 1.5rem; }
.dz-card__title { font-size: 1.35rem; margin-bottom: 0.9rem; }
.dz-field { border: 0; margin: 0 0 1.1rem; padding: 0; }
.dz-field legend, .dz-field > label:first-child, .dz-extras summary { font-weight: 700; font-size: 0.95rem; margin-bottom: 0.45rem; display: block; }
.dz-field select { width: 100%; padding: 0.65rem 0.75rem; border: 1.5px solid #CFC7D8; border-radius: var(--radius-sm); min-height: 46px; background: #fff; }
.dz-field .choice span { font-size: 0.9rem; padding: 0.45rem 0.8rem; }
.dz-field .opt { font-weight: 400; color: var(--color-text-light); }
.dz-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.18); }
.dz-swatch--warm { background: #FFD08A; box-shadow: 0 0 6px #FFC56B; }
.dz-swatch--cool { background: #EAF4FF; box-shadow: 0 0 6px #A9D3FF; }
.dz-swatch--cool-warm-flash { background: linear-gradient(90deg, #EAF4FF 50%, #FFD08A 50%); box-shadow: 0 0 6px #A9D3FF; }
.dz-extras summary { cursor: pointer; }
.dz-bauble-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem; margin-top: 0.6rem; }
.dz-bauble-grid label { display: flex; flex-direction: column; gap: 0.2rem; font-weight: 700; font-size: 0.9rem; }
.dz-bauble-grid small { font-weight: 400; color: var(--color-text-light); }
.dz-bauble-grid input { width: 100%; padding: 0.45rem; border: 1.5px solid #CFC7D8; border-radius: var(--radius-sm); }
.dz-voltage-advice { margin-top: 0.4rem; }

/* Price */
.dz-qty { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.dz-qty th, .dz-qty td { padding: 0.45rem 0.2rem; border-bottom: 1px solid var(--color-line); text-align: left; vertical-align: middle; }
.dz-qty th { font-weight: 700; }
.dz-qty th small { display: block; font-weight: 400; color: var(--color-text-light); }
.dz-qty td:nth-child(2) { white-space: nowrap; }
.dz-qty input { width: 4.6rem; padding: 0.4rem 0.45rem; border: 1.5px solid #CFC7D8; border-radius: var(--radius-sm); text-align: right; }
.dz-qty input.is-edited { border-color: var(--jds-orange); background: #FFF7EC; }
.dz-qty td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.dz-est { display: inline-block; font-size: 0.72rem; font-weight: 700; color: #8A5A00; background: #FFF1D6; border-radius: var(--radius-full); padding: 0.05rem 0.45rem; margin-left: 0.3rem; vertical-align: middle; }
.dz-sum { margin: 0.9rem 0 0.6rem; display: grid; gap: 0.35rem; }
.dz-sum div { display: flex; justify-content: space-between; gap: 1rem; }
.dz-sum dt { color: var(--color-text-light); }
.dz-sum dd { margin: 0; font-weight: 700; }
.dz-sum__min dt, .dz-sum__min dd { color: var(--jds-orange); }
.dz-sum__total { border-top: 2px solid var(--color-text); padding-top: 0.55rem; margin-top: 0.2rem; }
.dz-sum__total dt { color: var(--color-text); font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; }
.dz-sum__total dd { font-family: var(--font-heading); font-size: 1.7rem; color: var(--jds-red); line-height: 1; }

/* Mobile price bar */
.dz-pricebar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 90; display: none; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 1.1rem calc(0.7rem + env(safe-area-inset-bottom)); background: var(--color-bg-dark); color: #fff; box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.25); }
.dz-pricebar strong { color: var(--jds-gold); font-family: var(--font-heading); font-size: 1.3rem; margin-left: 0.3rem; }
@media (max-width: 1020px) { .dz-pricebar.is-shown { display: flex; } }
