/* aplicatie.css — stiluri proprii lecției „Tipuri de unghiuri” (doar variabile de culoare). */

/* ---------- planșe desenate ---------- */
.plate .ug-card,.plate .ug-cov{background:var(--card);color:var(--ink);border-radius:12px;padding:12px;font-weight:800}
.ug-svg{display:block;width:100%;height:auto;overflow:visible}
.ug-card>.ug-svg,.ug-cov>.ug-svg{max-height:270px}
/* culorile felurilor de unghi: ascuțit = albastru, drept = verde, obtuz = roșu, alungit/complet = galben */
.t-a{--tc:var(--sky);--tt:var(--sky-tint)}
.t-d{--tc:var(--leaf-deep);--tt:var(--leaf-tint)}
.t-o{--tc:var(--berry);--tt:var(--berry-tint)}
.t-l,.t-c{--tc:var(--sun-ink);--tt:var(--sun-tint)}
.t-n{--tc:var(--sun-edge);--tt:var(--sun-tint)}
.ug-lat{stroke:var(--ink);stroke-width:4;stroke-linecap:round}
.ug-varf{fill:var(--berry)}
.ug-sec{fill:var(--tt,var(--sun-tint));stroke:none}
.ug-mk{fill:none;stroke:var(--tc,var(--sky));stroke-width:3.5;stroke-linecap:round;stroke-linejoin:round}
.ug-mk-sub{stroke-width:2.5}
.ug-lit{fill:var(--ink);font-weight:900;font-size:21px;font-family:"Baloo 2",system-ui,sans-serif}
.ug-lit-o{fill:var(--berry)}
.ug-lit-mic{font-size:19px}
.ug-et{font-weight:800;font-size:15px}
.ug-et-m{fill:var(--muted)}
.ug-ghid{stroke:var(--muted);stroke-width:2.5;stroke-dasharray:6 6;opacity:.85}
.ug-cap{margin:8px 0 0;text-align:center;font-size:calc(19px * var(--fs));color:var(--ink);line-height:1.35;min-height:2.7em}
.ug-cap.nou{animation:ug-pop .35s ease-out}
.ug-cap-mic{margin:4px 0 0;text-align:center;font-size:calc(15px * var(--fs));color:var(--muted)}
.ug-static-only{display:none}
.static .ug-static-only{display:block}
.ug-tipw{color:var(--tc);background:var(--tt);border-radius:999px;padding:0 .35em;font-weight:900}
.ug-cat{color:var(--ink)}

/* foarfeca, ușa, laptopul, hârtia */
.ug-lama{fill:var(--card);stroke:var(--ink);stroke-width:3;stroke-linejoin:round}
.ug-maner{fill:var(--berry-tint);stroke:var(--berry);stroke-width:5}
.ug-maner-l{stroke:var(--berry);stroke-width:7;stroke-linecap:round}
.ug-ax{fill:var(--berry)}
.ug-perete{stroke:var(--muted);stroke-width:12;stroke-linecap:butt}
.ug-prag{stroke:var(--muted);stroke-width:2.5;stroke-dasharray:3 6}
.ug-usa{stroke:var(--sky);stroke-width:9;stroke-linecap:round}
.ug-obj{fill:var(--card);stroke:var(--muted);stroke-width:3}
.ug-ecran{stroke:var(--ink);stroke-width:8;stroke-linecap:round}
.ug-hartie{fill:var(--sun-tint);stroke:var(--muted);stroke-width:2.5;stroke-linejoin:round}
.ug-pliu{stroke:var(--ink);stroke-width:3.5;stroke-dasharray:8 5}
.ug-sageata{fill:none;stroke:var(--sun-edge);stroke-width:4;stroke-dasharray:2 7;stroke-linecap:round}
.ug-maner-b{fill:var(--sun);stroke:var(--sun-edge);stroke-width:3}

/* echerul */
.ug-ech{fill:var(--sun);fill-opacity:.45;fill-rule:evenodd;stroke:var(--sun-edge);stroke-width:2.5;stroke-linejoin:round}
.ug-ech-gr{stroke:var(--sun-edge);stroke-width:1.5}

/* figuri mici, una lângă alta, cu eticheta exact sub desen */
.ug-trei,.ug-duo,.ug-sase{display:grid;gap:10px;align-items:stretch}
.ug-trei{grid-template-columns:repeat(3,minmax(0,1fr))}
.ug-duo{grid-template-columns:repeat(2,minmax(0,1fr))}
.ug-sase{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.ug-fel{margin:0;display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:4px;background:var(--tt,var(--card));border:2px solid var(--tt,var(--line));border-radius:12px;padding:8px 6px}
.ug-fel .ug-svg{max-height:150px}
.ug-fel figcaption{display:flex;flex-direction:column;align-items:center;text-align:center;line-height:1.2}
.ug-fel figcaption b{color:var(--tc,var(--ink));font-size:calc(17px * var(--fs))}
.ug-fel figcaption small{color:var(--muted);font-size:calc(13px * var(--fs));font-weight:700}
.ug-bat{fill:none;stroke:var(--ink);stroke-width:9;stroke-linecap:round;stroke-linejoin:round}
.ug-lit-f{background:var(--card)}
.ug-lit-f figcaption b{font-size:calc(20px * var(--fs))}

/* ceasul */
.ug-cad{fill:var(--card);stroke:var(--ink);stroke-width:4}
.ug-tic{stroke:var(--muted);stroke-width:1.5}
.ug-tic-m{stroke:var(--ink);stroke-width:3}
.ug-cifra{fill:var(--ink);font-weight:900;font-size:19px}
.ug-ac{stroke:var(--ink);stroke-linecap:round}
.ug-ac-m{stroke-width:5}
.ug-ac-h{stroke-width:9}

/* sortare cu trei coșuri: coșurile pe un singur rând */
.task .sort:has(.bin:nth-child(3)){grid-template-columns:repeat(3,minmax(0,1fr))}
html.flow .task .sort:has(.bin:nth-child(3)){grid-template-columns:minmax(0,1fr)}

/* întrebările din verificare */
.ug-q{padding:6px!important}
.ug-q .ug-svg{max-height:220px}

/* ---------- laborator: deschide unghiul ---------- */
.du-top,.cu-top{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;font-weight:800;color:var(--muted);font-size:calc(15px * var(--fs))}
.du-tinta,.cu-tinta{color:var(--ink);font-size:calc(18px * var(--fs))}
.du-desen{background:var(--card);border:2px solid var(--line);border-radius:14px;margin:6px 0;padding:4px}
.du-svg{max-height:165px;touch-action:none;cursor:grab;user-select:none}
.du-svg:active{cursor:grabbing}
.du-maner{fill:var(--sun);stroke:var(--sun-edge);stroke-width:3;cursor:grab;outline:none}
.du-maner:focus-visible{stroke:var(--berry);stroke-width:5}
.du-sl{flex:1;display:flex;align-items:center;gap:6px;font-weight:800;color:var(--muted);font-size:calc(13px * var(--fs));min-width:170px}
.du-sl input{flex:1;accent-color:var(--sun-edge);height:28px}
.du-act{display:flex;gap:10px;justify-content:space-between;align-items:center;margin-top:6px;flex-wrap:wrap}
.cu-act{display:flex;gap:10px;justify-content:flex-end;align-items:center;margin-top:8px;flex-wrap:wrap}
.cu-act .verif{margin-left:auto}
.du-act .verif:disabled,.cu-act .verif:disabled{opacity:.45;box-shadow:none;cursor:not-allowed}
.du-gata,.cu-gata{display:flex;gap:4px;flex-wrap:wrap;flex:1;justify-content:center}
.du-gata,.cu-gata{flex:0 0 auto;justify-content:flex-end}
.du-gata .du-ok,.cu-gata .du-ok,.du-slot{display:inline-flex;align-items:center;justify-content:center;min-width:2em;height:calc(28px * var(--fs));padding:0 8px;font-size:calc(14px * var(--fs));border-radius:999px;font-weight:800}
.du-slot{border:2px dashed var(--line);color:var(--muted)}
.du-slot.cur{border:2px solid var(--ink);color:var(--ink)}
.du-ok{background:var(--tt);color:var(--tc);border:2px solid var(--tc);border-radius:999px;padding:2px 10px;font-weight:800;animation:ug-pop .35s ease-out}

/* ---------- laborator: ceasul unghiurilor ---------- */
.cu-grid{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);gap:12px;align-items:center;margin-top:6px}
.cu-ceas{background:var(--card);border:2px solid var(--line);border-radius:14px;padding:6px;display:flex;flex-direction:column;align-items:center}
.cu-ceas .ug-svg{max-height:165px}
.cu-ora{margin:4px 0 0;font-weight:800;font-size:calc(17px * var(--fs));color:var(--ink);min-height:1.5em;text-align:center}
.cu-ore{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.cu-ore .chip.cu-h{display:flex;align-items:center;justify-content:center;min-height:calc(44px * var(--fs));font-size:calc(18px * var(--fs));border:3px solid var(--stripe,var(--line));border-radius:14px;box-shadow:0 4px 0 var(--stripe,var(--line));cursor:pointer}
.cu-ore .chip.cu-h.ales{background:var(--berry);border-color:var(--berry);color:var(--card);box-shadow:0 4px 0 var(--ink);transform:translateY(-2px)}
.cu-ore .chip.cu-h:disabled{opacity:.55;transform:none}

/* ---------- laborator: antrenament rapid ---------- */
.an-top{display:flex;align-items:center;gap:10px;font-weight:800;color:var(--muted);font-size:calc(14px * var(--fs))}
.an-bar{flex:1;height:10px;background:var(--line);border-radius:99px;overflow:hidden}
.an-bar i{display:block;height:100%;background:var(--leaf);transition:width .4s}
.an-serie.aprinsa{color:var(--berry);animation:ug-pop .4s ease-out}
.an-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;align-items:center;margin-top:8px}
.an-desen{background:var(--card);border:2px solid var(--line);border-radius:14px;padding:6px}
.an-desen .ug-svg{max-height:170px}
.an-doua{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;align-items:center}
.an-doua .ug-svg{max-height:150px}
.an-semn{font-size:44px;fill:var(--sun-ink)}
.an-q{font-size:calc(19px * var(--fs));font-weight:800;margin:0 0 10px;color:var(--ink)}
.an-var{display:flex;flex-direction:column;gap:8px}
.an-var .chip{font-size:calc(18px * var(--fs));width:100%;justify-content:center}
.an-msg{min-height:1.4em;margin:8px 0 0;text-align:center;font-weight:800}
.an-msg.bine{color:var(--leaf-deep)} .an-msg.rau{color:var(--berry)}
.an-final{text-align:center}
.an-final .an-q{text-align:center}
.an-scor{font-family:"Baloo 2",system-ui,sans-serif;font-size:calc(54px * var(--fs));color:var(--leaf-deep);animation:ug-pop .5s}

@keyframes ug-pop{0%{transform:scale(.85)}70%{transform:scale(1.06)}100%{transform:none}}

/* fără animații (accesibilitate) sau mișcare redusă: stare statică, completă */
html.a-still .ug-cap,html.a-still .du-ok,html.a-still .an-scor,html.a-still .an-serie{animation:none!important}
html.a-still .an-bar i{transition:none}
@media (prefers-reduced-motion: reduce){
  .ug-cap,.du-ok,.an-scor,.an-serie{animation:none!important}
  .an-bar i{transition:none}
}

/* telefon: figurile mici pe mai puține coloane */
html.flow .ug-sase{grid-template-columns:repeat(3,minmax(0,1fr))}
html.flow .an-grid,html.flow .cu-grid{grid-template-columns:minmax(0,1fr)}

/* Butonul „Verifică” din bara de jos este ascuns; verificarea se deschide din cuprins sau după ultima stație. */
.bottom #checkBtn{display:none!important}


/* ===== aliniere comună (lecțiile refăcute): fără suprapuneri de butoane și text ===== */
/* plasă de siguranță: dacă o stație e mai înaltă decât scena, se derulează în interior, nu intră sub bara de jos */
html:not(.flow) .view.on{overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}
/* ordonare: toate cartonașele pe un rând, loc pentru bulina cu numărul, textul rămâne în cartonaș */
.task .order{grid-auto-flow:column;grid-auto-columns:minmax(0,1fr);grid-template-columns:none;gap:10px;margin-top:16px}
.task .order .ocard{min-width:0;padding:10px 6px 8px;overflow-wrap:anywhere;hyphens:auto}
.task .order .oc-emoji{font-size:2.1em;line-height:1.1}
.task .order .ocard .lab{font-size:calc(14px * var(--fs));line-height:1.2}
.task .order .ocard .more{font-size:calc(12px * var(--fs));line-height:1.2;color:var(--muted)}
.task .order .ocard .badge{top:-14px;left:-8px}
html.flow .task .order{grid-auto-flow:row;grid-template-columns:repeat(2,minmax(0,1fr))}
/* perechi: bulina cu numărul stă pe același rând cu textul, deci butonul nu crește după rezolvare */
.perechi .chip{display:flex;align-items:center;gap:8px;min-width:0;overflow-wrap:anywhere}
.perechi .chip[data-p]::after{flex:0 0 22px}
/* rânduri de butoane: se rup pe rândul următor în loc să se calce */
.grp,.chips,.actions{flex-wrap:wrap;row-gap:10px}
.chip,.btn{max-width:100%}
.btn{white-space:normal}
