/* Ciclo de brilho (lavanderias self-service).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): o LED do painel e os botões;
 * aço escovado, vidro escuro e dourado do QR em hex direto. Nunca azul.
 *
 * Contrato:
 *  - Estado FINAL por classe estática ou @keyframes … forwards.
 *  - Movimento reduzido: cada coisa para num estado VISÍVEL.
 *  - Segmentos, etapas e cronômetro são JS; aqui o PRONTO piscando e a tela
 *    final (QR dourado ou aviso padrão).
 *  - Nenhum percentual no painel.
 */

.cb__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background:
        repeating-linear-gradient(90deg, rgba(255, 255, 255, .08) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        linear-gradient(180deg, #E7EBE9, #C9D0CC);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5);
    user-select: none;
    font-family: Arial, sans-serif;
}

.cb__rotulo {
    position: absolute;
    left: 50%; top: 2.5%;
    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;
}
.cb__rotulo img { width: 12px; height: 12px; }

/* ---------------- moldura e tela ---------------- */

.cb__moldura {
    position: absolute;
    left: 7%; right: 7%; top: 12%; bottom: 7%;
    border-radius: 16px;
    background: linear-gradient(180deg, #3A403C, #1E2320);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15), 0 8px 16px -8px rgba(0, 0, 0, .6);
    padding: 3.2%;
    box-sizing: border-box;
    display: flex; flex-direction: column; gap: 4%;
}
.cb__tela {
    position: relative;
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, rgba(0, 0, 0, 0) 1px 3px),
        radial-gradient(ellipse at 50% 30%, var(--jg-13261b, #13261B), var(--jg-07100b, #07100B) 75%);
    box-shadow: inset 0 0 0 1px rgba(var(--jg-rgb-7dffa8, 125,255,168), .12), inset 0 0 22px rgba(0, 0, 0, .7);
    color: var(--jg-7dffa8, #7DFFA8);
    display: flex; flex-direction: column; justify-content: space-between;
    padding: 3% 5%;
    box-sizing: border-box;
}
.cb__topo { display: flex; justify-content: space-between; align-items: center;
            font: 700 clamp(8px, 2vw, 10px)/1 Consolas, 'Courier New', monospace; letter-spacing: .12em; opacity: .6; }
.cb__rede { display: inline-flex; gap: 2px; align-items: flex-end; }
.cb__rede i { display: block; width: 3px; background: currentColor; border-radius: 1px; }
.cb__rede i:nth-child(1) { height: 4px; } .cb__rede i:nth-child(2) { height: 7px; } .cb__rede i:nth-child(3) { height: 10px; }

.cb__etapas { display: flex; justify-content: space-around; }
.cb__etapa { display: flex; flex-direction: column; align-items: center; gap: 3px; opacity: .28;
             font: 700 clamp(8px, 2.2vw, 11px)/1 Consolas, 'Courier New', monospace; letter-spacing: .1em; }
.cb__etapa svg { width: clamp(16px, 5vw, 26px); height: auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.cb__etapa--feita { opacity: .6; }
.cb__etapa--atual { opacity: 1; text-shadow: 0 0 6px currentColor; }
.cb__etapa--atual svg { filter: drop-shadow(0 0 3px currentColor); }
.cb--pronto .cb__etapa:nth-child(3) { animation: cb-pisca var(--cb-pisca, .9s) steps(1, end) forwards; }
@keyframes cb-pisca { 0% { opacity: 1; } 16% { opacity: .2; } 33% { opacity: 1; } 50% { opacity: .2; } 66%, 100% { opacity: 1; } }

.cb__relogio {
    text-align: center;
    font: 700 clamp(26px, 8vw, 44px)/1 Consolas, 'Courier New', monospace;
    letter-spacing: .06em;
    text-shadow: 0 0 8px currentColor;
}
.cb__barra { display: flex; gap: 1.2%; height: clamp(8px, 2.6vw, 14px); }
.cb__seg { flex: 1; border-radius: 2px; background: rgba(var(--jg-rgb-7dffa8, 125,255,168), .12); }
.cb__seg--on { background: currentColor; box-shadow: 0 0 6px currentColor; }
.cb__seg--prox { background: rgba(var(--jg-rgb-7dffa8, 125,255,168), .55); }

.cb__teclas { display: flex; justify-content: center; align-items: center; gap: 5%; height: 12%; }
.cb__teclas i { display: block; width: 5%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(180deg, #5A635E, #2A302C); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2); }
.cb__teclas .cb__tecla-grande { width: 8%; background: radial-gradient(circle at 40% 35%, var(--jg-2aa152, #2AA152), var(--jg-14532d, #14532d)); }

/* ---------------- tela final ---------------- */

.cb__final {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: radial-gradient(ellipse at 50% 40%, var(--jg-13261b, #13261B), var(--jg-07100b, #07100B) 75%);
    opacity: 0;
    pointer-events: none;
}
.cb--final .cb__final { animation: cb-final var(--cb-revela, .6s) ease-out forwards; }
@keyframes cb-final { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }

.cb__final-sim { display: flex; align-items: center; gap: 6%; padding: 0 6%; width: 100%; box-sizing: border-box; }
.cb__qr-caixa { position: relative; width: 40%; aspect-ratio: 1; flex: none;
                filter: drop-shadow(0 0 10px rgba(255, 214, 90, .6)); }
.cb__qr { width: 100%; height: 100%; display: block; fill: #F4C430; border-radius: 6px; }
.cb__qr .cb__qr-fundo { fill: var(--jg-0b1510, #0B1510); }
.cb__qr-caixa img { position: absolute; left: 50%; top: 50%; width: 30%; aspect-ratio: 1; transform: translate(-50%, -50%);
                    object-fit: cover; border-radius: 6px; border: 2px solid #F4C430; background: #fff; }
.cb__final-txt { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: #FFE9A0; }
.cb__final-txt b { font: 900 clamp(12px, 3.4vw, 17px)/1.1 'Arial Black', Arial, sans-serif; letter-spacing: .06em; color: #F4C430; text-shadow: 0 0 8px rgba(244, 196, 48, .7); }
.cb__final-txt span { font: 700 clamp(10px, 2.6vw, 13px)/1.2 Consolas, 'Courier New', monospace; opacity: .85; }
.cb__final-txt strong { font: 700 clamp(13px, 3.6vw, 18px)/1.2 Georgia, 'Times New Roman', serif; color: #FFF6D0; overflow-wrap: anywhere; }

.cb__final-nao { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; }
.cb__final-nao b { font: 700 clamp(15px, 4.4vw, 24px)/1.1 Consolas, 'Courier New', monospace; letter-spacing: .08em; text-shadow: 0 0 8px currentColor; }
.cb__final-nao span { font: 700 clamp(13px, 3.6vw, 20px)/1.1 Consolas, 'Courier New', monospace; letter-spacing: .12em; opacity: .8; }

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

.cb__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);
}
.cb__botao:hover:not(:disabled) { filter: brightness(1.06); }
.cb__botao:disabled { opacity: .55; cursor: default; }

.cb__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);
}
.cb__msg--premiado { background: var(--jg-e3f5e6, #E3F5E6); border-color: var(--jg-9fd8ab, #9FD8AB); color: var(--jg-14532d, #14532d); }
.cb__msg--consolo  { background: #F1F3F1; border-color: #CDD5CE; color: #4F5A52; }
.cb__msg b { color: var(--jg-0a7a00, #0A7A00); }
.cb__msg--consolo b { color: #5C6B60; }

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

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

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .cb--pronto .cb__etapa:nth-child(3) { animation: none; opacity: 1; }
    .cb--final .cb__final { animation: none; opacity: 1; transform: none; }
}
