/* Configuratorul, în sistemul de design al site-ului (tokens.css + components.css de pe /staging/, docs/design-system.md
   din Claude-WEB). Aici sunt doar piesele proprii configuratorului; culorile, fonturile și formele vin din tokeni. */
:root { color-scheme: light; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bci-cream); color: var(--bci-text);
  font: 400 var(--bci-text-base) / var(--bci-leading) var(--bci-font-body); -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--bci-font-display); font-weight: 400; line-height: var(--bci-leading-tight); letter-spacing: var(--bci-tracking-display); }
.wrap { max-width: var(--bci-wrap); margin: 0 auto; padding: 0 var(--bci-gutter); }
.muted { color: var(--bci-text-muted); } .small { font-size: var(--bci-text-sm); }
a { color: inherit; }
.bci-link-inline { color: var(--bci-orange-text); font-weight: 700; }

/* antet și subsol, ca pe site */
.site-header { background: var(--bci-cream); border-bottom: 2px solid var(--bci-ink); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--bci-font-display); text-transform: uppercase; font-size: 15px; line-height: 1.05; color: var(--bci-ink); }
.site-footer { margin-top: var(--bci-section); background: var(--bci-ink-2); color: var(--bci-text-on-dark); padding: 28px 0 40px; font-size: var(--bci-text-sm); }
.site-footer a { display: inline-flex; min-height: var(--bci-touch); align-items: center; color: inherit; font-weight: 700; }
.site-footer p { margin: 4px 0 0; }

h1 { font-size: var(--bci-text-3xl); margin: 8px 0; }
#pas-poze .bci-eyebrow { margin: 28px 0 0; }
.intro { color: var(--bci-text-soft); margin: 0 0 8px; max-width: 60ch; }
h2 { font-size: var(--bci-text-xl); margin: 36px 0 14px; display: flex; align-items: center; gap: 10px; }
.nr { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--bci-orange); color: var(--bci-ink);
  border: 2px solid var(--bci-ink); font-size: 1rem; flex: none; }

/* panourile */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.card { background: var(--bci-paper); border: var(--bci-border) solid var(--bci-ink); border-radius: var(--bci-radius-lg); box-shadow: var(--bci-shadow-md);
  padding: 10px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.card h3 { margin: 2px 2px 0; font-size: var(--bci-text-base); }
.thumb { aspect-ratio: var(--ar); background: var(--bci-cream-deep); border: 2px dashed var(--bci-ink); border-radius: var(--bci-radius-sm); display: grid; place-items: center; overflow: hidden; }
.thumb:has(canvas) { border-style: solid; background: var(--bci-ink); }
.thumb canvas { width: 100%; height: 100%; display: block; }
.thumb .gol { color: var(--bci-text-soft); font-size: var(--bci-text-sm); text-align: center; padding: 8px; }
.card .actions { display: flex; flex-wrap: wrap; gap: 6px; }
.card .actions .bci-btn { flex: 1 1 auto; padding: 0 12px; }
.card .move { display: flex; justify-content: space-between; gap: 6px; }
.card .move .bci-btn { min-width: var(--bci-touch); padding: 0 12px; }
.card .move .dreapta:only-child { margin-left: auto; }
.card select { font: inherit; font-size: 16px; min-height: var(--bci-touch); padding: 6px 10px; border-radius: var(--bci-radius-sm); border: 2px solid var(--bci-ink); background: var(--bci-white); width: 100%; color: var(--bci-text); }
.carusel-nav { display: none; }
.avert { margin: 0; color: var(--bci-text); background: var(--bci-warning-soft); border: 2px solid var(--bci-ink); border-radius: var(--bci-radius-md); padding: 8px 10px; font-size: var(--bci-text-sm); }
.card .avert { font-size: var(--bci-text-xs); padding: 6px 8px; }

/* lampa 3D */
.viewer { position: relative; background: var(--bci-paper); border: var(--bci-border) solid var(--bci-ink); border-radius: var(--bci-radius-lg); box-shadow: var(--bci-shadow-md); overflow: hidden; }
.lampa3d { height: min(70vh, 520px); position: relative; background: #2d2b2a; border-bottom: 2px solid var(--bci-ink); }
.lampa3d canvas { width: 100%; height: 100%; display: block; }
.lampa3d .loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--bci-text-on-dark); }
.full-btn { position: absolute; top: 10px; right: 10px; z-index: 2; }
.full-btn[hidden] { display: none; }
.viewer.full { position: fixed; inset: 0; z-index: 50; border: 0; border-radius: 0; box-shadow: none; display: flex; flex-direction: column; }
.viewer.full .lampa3d { flex: 1; height: auto; }
.fara-derulare, .fara-derulare body { overflow: hidden; }
.viewer-bar { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; padding: 10px; }
.viewer-bar .hint { text-align: center; line-height: 1.2; color: var(--bci-text-muted); font-size: var(--bci-text-sm); }
.viewer-bar .bci-chips { flex-wrap: nowrap; gap: 6px; }

/* comanda */
#comanda { display: grid; gap: 16px; }
#comanda p.small { margin: 0; }
.sumar { border-top: 2px solid var(--bci-ink); padding-top: 12px; display: grid; gap: 4px; }
.sumar div { display: flex; justify-content: space-between; gap: 12px; }
.sumar .total { font-family: var(--bci-font-display); font-size: var(--bci-text-lg); }
.err { color: var(--bci-error); }
.bci-note[hidden] { display: none; }
.bci-note p { margin: 6px 0 0; }

/* editorul */
dialog#editor { border: var(--bci-border) solid var(--bci-ink); padding: 0; width: min(980px, 100vw); max-width: 100vw; max-height: 100dvh; border-radius: var(--bci-radius-lg); background: var(--bci-cream); color: var(--bci-text); }
dialog#editor::backdrop { background: rgba(28, 37, 34, .6); }
.ed-top { position: sticky; top: 0; background: var(--bci-cream); display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 2px solid var(--bci-ink); z-index: 1; }
.ed-top strong { font-family: var(--bci-font-display); font-weight: 400; font-size: var(--bci-text-lg); }
.ed-body { display: grid; grid-template-columns: 3fr 2fr; grid-template-areas: "crop ctrl"; gap: 20px; padding: 12px 16px 20px; }
.ed-crop { grid-area: crop; } .ed-ctrl { grid-area: ctrl; }
.ed-sub { font-family: var(--bci-font-display); font-size: var(--bci-text-base); }
.ed-crop, .ed-ctrl { display: grid; gap: 10px; align-content: start; min-width: 0; }
.ed-body p { margin: 0; }
.ed-ctrl label { display: grid; gap: 2px; font-weight: 700; font-size: var(--bci-text-sm); }
.crop { background: var(--bci-ink); border: 2px solid var(--bci-ink); border-radius: var(--bci-radius-sm); overflow: hidden; touch-action: none; cursor: grab; }
.crop canvas { width: 100%; height: auto; display: block; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row .bci-btn { flex: 1; padding: 0 10px; }
input[type=range] { width: 100%; padding: 0; border: 0; accent-color: var(--bci-orange); height: var(--bci-touch); }
[aria-invalid="true"] { border-color: var(--bci-error); }

main.text { max-width: 720px; padding-bottom: 48px; }
main.text li { margin-bottom: 6px; }

@media (max-width: 480px) {
  /* pe telefon, textul „Rotește” stă jos, peste lampă, ca opțiunile să încapă pe un rând */
  .viewer-bar { grid-template-columns: auto auto; justify-content: space-between; padding: 8px; gap: 6px; }
  .viewer-bar .hint { position: absolute; left: 0; right: 0; bottom: 72px; color: var(--bci-text-on-dark); font-size: var(--bci-text-xs); pointer-events: none; }
  .viewer-bar .bci-chips { gap: 4px; }
  .viewer-bar .bci-chip span { padding: 6px 11px; font-size: var(--bci-text-sm); }
}
@media (max-width: 720px) {
  dialog#editor { width: 100vw; height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .ed-body { grid-template-columns: 1fr; grid-template-areas: "crop" "ctrl"; }
  .lampa3d { height: min(58vh, 460px); }
  /* panourile ca un carusel: ~1,2 carduri vizibile, cu swipe și indicator de poziție */
  .grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 80%; gap: 12px; overflow-x: auto;
    scroll-snap-type: x mandatory; overscroll-behavior-x: contain; margin: 0 calc(-1 * var(--bci-gutter));
    padding: 4px var(--bci-gutter) 12px; scroll-padding: 0 var(--bci-gutter); scrollbar-width: none; }
  .grid::-webkit-scrollbar { display: none; }
  .grid .card { scroll-snap-align: center; }
  .carusel-nav { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 4px; font-size: var(--bci-text-sm); color: var(--bci-text-soft); font-weight: 700; }
  .carusel-nav .dots { display: flex; gap: 8px; }
  .carusel-nav i { width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--bci-ink); background: var(--bci-paper); }
  .carusel-nav i.on { background: var(--bci-orange); }
  .card .actions .bci-btn { font-size: var(--bci-text-sm); }
}

/* pagina de mulțumire */
.nr-comanda { font-family: var(--bci-font-display); font-weight: 400; letter-spacing: .02em; }
.lampa-anim { width: 120px; height: 130px; display: block; margin: 8px 0 0; }
.lampa-anim .corp { fill: var(--bci-ink); }
.lampa-anim .panou { fill: #7d7870; animation: aprinde 1.6s .4s ease-out forwards; }
.lampa-anim .halou { fill: var(--bci-orange); opacity: 0; animation: halou 1.6s .4s ease-out forwards; }
@keyframes aprinde { to { fill: #fff3dc; filter: drop-shadow(0 0 14px #ffc46b) drop-shadow(0 0 4px #ffe2a8); } }
@keyframes halou { to { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  .lampa-anim .panou { animation: none; fill: #fbecd0; }
  .lampa-anim .halou { animation: none; opacity: .35; }
}
.rezumat { margin: 20px 0; }
.rezumat h2 { margin: 0 0 10px; }
.rezumat dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.rezumat dt { color: var(--bci-text-soft); } .rezumat dd { margin: 0; }
.pasi { padding-left: 22px; display: grid; gap: 10px; }
.linkuri { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 0; }
