/* Esteira maluca (supermercados).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>); kraft, cinzas do caixa, vermelho
 * do laser e dourado em hex direto. Nunca azul.
 *
 * Contrato:
 *  - Estado FINAL por classe estática ou @keyframes … forwards.
 *  - Movimento reduzido: cada coisa para num estado VISÍVEL.
 *  - Esteira, sacolas e laser são JS; aqui só a abertura e o desfecho.
 *  - A abertura das sacolas (alça da frente cai, boca aparece) é igual nas duas.
 *  - Posições em % do palco: viewBox 160×110 no mesmo 16:11 do palco.
 *    Sacolas em x = 55, 80, 105 (34.4%, 50%, 65.6%); boca em y 44 (40%).
 */

.et__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: #F5F1E6;
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5);
    user-select: none;
    font-family: Arial, sans-serif;
}
.et__cena { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.et__rotulo {
    position: absolute;
    left: 50%; top: 1.8%;
    transform: translateX(-50%);
    display: inline-flex; align-items: center; gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--jg-14532d, #14532d);
    border: 1px solid #C9A227;
    font: 700 10px/1 Arial, sans-serif;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #FFF3C4;
    white-space: nowrap;
    z-index: 8;
}
.et__rotulo img { width: 12px; height: 12px; }

/* ---------------- leitor ---------------- */

.et__visor { font: 700 5.6px/1 Consolas, 'Courier New', monospace; fill: var(--jg-7dffa8, #7DFFA8); letter-spacing: .2px; }
.et--visor-sim .et__visor { fill: #FFE26E; }
.et--visor-nao .et__visor { fill: #D5DBD8; }
.et--lido .et__visor { animation: et-pisca .35s steps(2, jump-none) 2; }
@keyframes et-pisca { 50% { opacity: .2; } }

/* ---------------- sacolas ---------------- */

.et__boca { opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
.et__alca--frente { transform-box: fill-box; transform-origin: 50% 100%; }
.et--abre .et__boca { animation: et-boca var(--et-abre, .5s) ease-out forwards; }
.et--abre .et__alca--frente { animation: et-alca var(--et-abre, .5s) cubic-bezier(.4, 0, .6, 1.4) forwards; }
@keyframes et-boca { from { opacity: 0; transform: scaleY(.3); } to { opacity: 1; transform: scaleY(1.35); } }
@keyframes et-alca { to { transform: scaleY(-.75); } }

/* ---------------- confetes e prêmio ---------------- */

.et__confetes { position: absolute; inset: 0; pointer-events: none; z-index: 6; }
.et__confetes i {
    position: absolute;
    top: 40%;
    width: 1.7%; height: 2.6%;
    border-radius: 1px;
    opacity: 0;
}
.et--premiou .et__confetes i { animation: et-confete 1.2s cubic-bezier(.2, .7, .4, 1) forwards; }
@keyframes et-confete {
    0%   { opacity: 0; transform: translate(0, 0) rotate(0deg); }
    15%  { opacity: 1; }
    100% { opacity: 1; margin-left: var(--dx); top: calc(40% + var(--dy)); transform: rotate(var(--r)); }
}

.et__bolha {
    position: absolute;
    left: 50%; top: 40%;
    width: 18%;
    aspect-ratio: 1;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: 3px solid #D4AF37;
    box-shadow: 0 0 0 3px rgba(255, 243, 196, .9), 0 10px 22px -8px rgba(0, 0, 0, .5);
    transform: translate(-50%, -50%) scale(.1);
    opacity: 0;
    z-index: 7;
}
.et__bolha img { width: 100%; height: 100%; object-fit: cover; display: block; }
.et--premiou .et__bolha { animation: et-sobe var(--et-revela, .7s) cubic-bezier(.3, 1.3, .5, 1) forwards; }
@keyframes et-sobe {
    0%   { top: 42%; transform: translate(-50%, -50%) scale(.1); opacity: 0; }
    30%  { opacity: 1; }
    100% { top: 34%; transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* ---------------- placa do prêmio ---------------- */

.et__placa {
    position: absolute;
    left: 50%; bottom: 4%;
    width: 58%;
    transform: translate(-50%, 16px);
    opacity: 0;
    display: flex; align-items: center; justify-content: center;
    padding: 6px 9px;
    box-sizing: border-box;
    border-radius: 8px;
    background: linear-gradient(180deg, #FFF8DC, #F5E3A1);
    border: 1.5px solid #C9A227;
    box-shadow: 0 8px 16px -8px rgba(0, 0, 0, .7);
    text-align: center;
    z-index: 9;
}
.et__placa div { font: 700 clamp(11px, 2.8vw, 13px)/1.25 Arial, sans-serif; color: var(--jg-14532d, #14532d); min-width: 0; }
.et__placa small { display: block; font: 700 9px/1.2 Arial, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #8A6D1F; margin-bottom: 2px; }
.et--placa .et__placa { animation: et-placa .5s cubic-bezier(.3, 1.3, .5, 1) forwards; }
@keyframes et-placa { to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------------- botão e mensagem ---------------- */

.et__botao {
    display: block;
    width: 100%;
    max-width: 480px;
    margin: 10px auto 0;
    padding: 12px 10px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
    color: #fff;
    font: 700 15px/1.2 Arial, sans-serif;
    letter-spacing: .02em;
    cursor: pointer;
    touch-action: manipulation;
    box-shadow: 0 6px 14px -6px rgba(var(--jg-rgb-0a7a00, 10,122,0), .8), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.et__botao:hover:not(:disabled) { filter: brightness(1.06); }
.et__botao:disabled { opacity: .55; cursor: default; }

.et__msg {
    max-width: 480px;
    min-height: 56px;
    margin: 10px auto 0;
    padding: 8px 12px;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    border-radius: 9px;
    text-align: center;
    font: 700 clamp(11px, 3vw, 14px)/1.35 Arial, sans-serif;
    color: #46564c;
    background: var(--jg-eef4ef, #EEF4EF);
    border: 1px solid var(--jg-dce6de, #DCE6DE);
}
.et__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.et__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.et__msg b { color: var(--jg-0a7a00, #0A7A00); }
.et__msg--consolo b { color: #5C6B60; }

/* ---------------- vitrine ---------------- */

.et__premios {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 10px;
    margin: 14px auto 0; max-width: 640px;
}
.et__titulo {
    width: 100%; text-align: center;
    font: 700 13px/1.3 Arial, sans-serif; color: var(--jg-14532d, #14532d); margin-bottom: 2px;
}
.et__premio { width: 74px; text-align: center; font: 600 10px/1.2 Arial, sans-serif; color: #46564c; }
.et__premio img { width: 100%; border-radius: 6px; display: block; margin-bottom: 3px; }

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .et--lido .et__visor { animation: none; }
    .et--abre .et__boca { animation: none; opacity: 1; transform: scaleY(1.35); }
    .et--abre .et__alca--frente { animation: none; transform: scaleY(-.75); }
    .et--premiou .et__confetes i { animation: none; opacity: 1; margin-left: var(--dx); top: calc(40% + var(--dy)); transform: rotate(var(--r)); }
    .et--premiou .et__bolha { animation: none; top: 34%; transform: translate(-50%, -50%) scale(1); opacity: 1; }
    .et--placa .et__placa { animation: none; transform: translate(-50%, 0); opacity: 1; }
}
