/* Fervo — componentes do tema usados por qualquer composição.
   Ficam aqui porque não pertencem a um arranjo: a foto ampliada e a barra de ações
   são as mesmas na composição A ("menu de garagem") e na B ("linha de montagem"). */

/* ---------- foto ampliada ---------- */
.fv-lb { overscroll-behavior: contain; width: 100vw; height: 100svh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; overflow: hidden;
  background: var(--fv-bg); color: var(--fv-ink); }
.fv-lb[open] { display: grid; grid-template-rows: 1fr auto; }
.fv-lb::backdrop { background: rgba(0,0,0,.8); }
.fv-lb__stage { min-height: 0; display: flex; align-items: center; justify-content: center; padding: 16px; overflow: hidden; }
.fv-lb__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; touch-action: pan-y; -webkit-user-select: none; user-select: none; }
.fv-lb__bar { display: flex; justify-content: center; gap: 2px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
.fv-lb__btn, .fv-lb__count { min-width: 56px; min-height: 48px; display: grid; place-items: center; border: 0; background: var(--fv-block); color: var(--fv-block-on);
  font: 900 italic 1.25rem/1 var(--fv-font-cond); cursor: pointer; }
.fv-lb__count { min-width: 96px; background: var(--fv-inv); color: var(--fv-inv-ink); cursor: default; }
@media (hover: hover) and (pointer: fine) { .fv-lb__btn:hover { background: var(--fv-mag); color: #fff; } }


/* ---------- barra de ações ---------- */
.fv-keys { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 28px; }
.fv-keys a, .fv-keys button { min-height: 44px; display: grid; place-items: center; padding: 0 14px; border: 0; background: var(--fv-block); color: var(--fv-block-on);
  font: 800 italic 1rem/1 var(--fv-font-cond); text-transform: uppercase; text-decoration: none; cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .fv-keys a:hover, .fv-keys button:hover { background: var(--fv-inv); color: var(--fv-inv-ink); box-shadow: inset 0 0 0 2px var(--fv-block); } }

/* ---------- interruptor dia/noite ---------- */
.fv-mode { flex: none; display: flex; gap: 2px; padding: 0; border: 0; background: none; cursor: pointer; }
.fv-mode span { display: grid; place-items: center; min-height: 44px; padding: 0 12px; background: var(--fv-block); color: var(--fv-block-on);
  font: 800 italic .9375rem/1 var(--fv-font-cond); text-transform: uppercase; transition: background var(--fv-t-snap), color var(--fv-t-snap); }
/* tinta escura sobre o magenta: branco sobre essa cor dá 3,5 e o rótulo tem 12px.
   Combina com o lado "dia", que já é tinta escura sobre o amarelo. */
[data-mode="noite"] .fv-mode [data-m="noite"] { background: var(--fv-mag); color: #141217; box-shadow: var(--fv-glow-mag); }
[data-mode="dia"] .fv-mode [data-m="dia"] { background: var(--fv-sun); color: #141217; box-shadow: inset 0 0 0 2px #141217; }


/* ---------- glitch overlay (mode switch) ---------- */
body.is-glitching::after { content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(transparent 20%, rgba(255,42,138,.35) 20% 27%, transparent 27% 58%, rgba(41,227,240,.35) 58% 63%, transparent 63% 81%, rgba(255,255,255,.25) 81% 84%, transparent 84%);
  animation: fv-glitch 220ms steps(3) both; }
@keyframes fv-glitch { 0% { transform: translateX(-14px); } 50% { transform: translateX(12px) scaleY(1.2); } 100% { transform: translateX(0); opacity: 0; } }
.is-glitch-img { animation: fv-slice 160ms steps(2) both; }
@keyframes fv-slice { 0% { clip-path: inset(10% 0 55% 0); transform: translateX(10px); } 50% { clip-path: inset(50% 0 20% 0); transform: translateX(-8px); } 100% { clip-path: inset(0); transform: none; } }

