/* Recibo premiado (postos, pagamento pelo app).
 *
 * Cores de MARCA como var(--jg-<hex>, #<hex>): topo do app, anel, comprovante e
 * botões; celular, pátio do posto e ouro em hex direto. Nunca azul.
 *
 * Contrato:
 *  - Estado FINAL por classe estática ou @keyframes … forwards.
 *  - Movimento reduzido: cada coisa para num estado VISÍVEL.
 *  - Círculo e anel são JS (atributos no SVG), pelo relógio; aqui a tela de
 *    resultado (dourada ou comprovante), escrita só no desfecho.
 */

.rc__palco {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    aspect-ratio: 16 / 11;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, #F6F2EA 0%, #EDE5D6 72%, #D9CBB3 72%, #CDBD9F 100%);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .45);
    user-select: none;
    font-family: Arial, sans-serif;
}

/* ---------------- o celular ---------------- */

.rc__celular {
    position: absolute;
    left: 55%; top: 50%;
    height: 94%;
    aspect-ratio: 9 / 16;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    padding: 2.4% 2.4%;
    border-radius: 18px;
    background: linear-gradient(135deg, #3A413C, #1C211E);
    box-shadow: 0 14px 26px -10px rgba(0, 0, 0, .55), inset 0 0 0 1.5px #555E57;
    z-index: 2;
}
.rc__tela {
    position: relative;
    width: 100%; height: 100%;
    border-radius: 13px;
    overflow: hidden;
    background: #FBFAF6;
}
.rc__app { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; }
.rc__topo {
    width: 100%;
    box-sizing: border-box;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    padding: 9% 6% 5%;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
    border-bottom: 2px solid #C9A227;
    color: #FFF3C4;
    font: 700 clamp(8px, 2.3vw, 11px)/1.1 Arial, sans-serif;
    letter-spacing: .04em;
    text-align: center;
}
.rc__topo img { width: 13px; height: 13px; flex: none; }
.rc__ola { margin: 7% 0 4%; text-align: center; font: 400 clamp(7px, 2vw, 10px)/1.3 Arial, sans-serif; color: #5C6B60; }
.rc__ola b { color: var(--jg-14532d, #14532d); font-size: 1.15em; }

/* ---------------- tela de resultado (escrita só no desfecho) ---------------- */

.rc__resultado { position: absolute; inset: 0; pointer-events: none; }
.rc__ouro, .rc__padrao {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 0 8%;
    text-align: center;
    opacity: 0;
    animation: rc-entra var(--rc-troca, .5s) ease-out forwards;
}
@keyframes rc-entra { from { opacity: 0; transform: scale(1.06); } to { opacity: 1; transform: scale(1); } }

.rc__ouro {
    background:
        radial-gradient(circle at 50% 30%, rgba(255, 250, 220, .9), rgba(255, 250, 220, 0) 55%),
        linear-gradient(160deg, #FFF3B0, #F4C430 45%, #C98E0E);
    color: var(--jg-14532d, #14532d);
}
.rc__titulo {
    font: 700 clamp(10px, 2.9vw, 14px)/1.2 Georgia, 'Times New Roman', serif;
    color: var(--jg-14532d, #14532d);
    text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
    animation: rc-pisca .45s .3s 4 alternate both;
}
@keyframes rc-pisca { from { opacity: 1; } to { opacity: .25; } }
.rc__foto { width: 46%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 3px solid #FFFFFF; box-shadow: 0 0 0 1.5px #9A7414, 0 0 16px 4px rgba(255, 246, 200, .8); background: #fff; margin: 9% 0 6%; }
.rc__ouro small { font: 700 clamp(6px, 1.7vw, 8px)/1.2 Arial, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: #6B4E0E; }
.rc__nome { font: 700 clamp(10px, 2.8vw, 14px)/1.2 Georgia, 'Times New Roman', serif; overflow-wrap: anywhere; }
.rc__padrao { background: #FBFAF6; gap: 5%; }
.rc__check { width: 38%; }
.rc__check path { stroke-dasharray: 1 1; stroke-dashoffset: 1; animation: rc-traco .45s .25s ease-out forwards; }
@keyframes rc-traco { to { stroke-dashoffset: 0; } }
.rc__padrao b { font: 700 clamp(9px, 2.5vw, 12px)/1.25 Arial, sans-serif; color: var(--jg-14532d, #14532d); }
.rc__padrao span { font: 400 clamp(8px, 2.2vw, 11px)/1.3 Arial, sans-serif; color: #5C6B60; }

/* rótulo */
.rc__rotulo {
    position: absolute;
    left: 2%; bottom: 2%;
    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;
}
.rc__rotulo img { width: 12px; height: 12px; }

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

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

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

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

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

/* ---------------- movimento reduzido ---------------- */
@media (prefers-reduced-motion: reduce) {
    .rc__ouro, .rc__padrao { animation: none; opacity: 1; }
    .rc__titulo { animation: none; }
    .rc__confete i { animation: none; opacity: .9; }
    .rc__check path { animation: none; stroke-dashoffset: 0; }
}

/* ---------------- recibo: pátio do posto, tela de pagamento e comprovante ---------------- */

.rc__palco { background: linear-gradient(180deg, #E9EEEB 0%, #F4F6F5 60%, #C9CFCC 60%, #B9C0BC 100%); }
.rc__fundo { position: absolute; inset: 0; pointer-events: none; }
.rc__fundo::before {                                     /* a cobertura do posto */
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 11%;
    background: linear-gradient(180deg, var(--jg-14532d, #14532d), var(--jg-0a7a00, #0A7A00));
    border-bottom: 3px solid #C9A227;
}
.rc__fundo::after {                                      /* faixa do piso */
    content: ''; position: absolute; left: 0; right: 0; top: 60%; height: 1.2%; background: #FFFFFF; opacity: .7;
}
.rc__fundo i {                                           /* bombas ao fundo, desfocadas */
    position: absolute; bottom: 38%; width: 9%; height: 30%;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, #DCE3DF, #C3CCC7);
    filter: blur(1px);
    opacity: .85;
}
.rc__fundo i::before { content: ''; position: absolute; left: 18%; right: 18%; top: 12%; height: 18%; border-radius: 3px; background: #2F3A35; }
.rc__fundo i:nth-child(1) { left: 6%; }
.rc__fundo i:nth-child(2) { left: 19%; height: 26%; }
.rc__fundo i:nth-child(3) { right: 8%; }

.rc__linha {
    width: 84%;
    display: flex; justify-content: space-between; align-items: baseline;
    margin: 9% 0 4%;
    padding-bottom: 4%;
    border-bottom: 1px dashed #DDE3DF;
    font: 400 clamp(7px, 1.9vw, 9px)/1.2 Arial, sans-serif; color: #6B7A70;
}
.rc__linha b { color: var(--jg-14532d, #14532d); font-size: 1.1em; }
.rc__roda { width: 58%; margin-top: 4%; }
.rc__roda svg { display: block; width: 100%; }
.rc__status { margin-top: 7%; font: 700 clamp(8px, 2.1vw, 10.5px)/1.2 Arial, sans-serif; color: #46564c; }
.rc__seguro { margin-top: auto; margin-bottom: 7%; font: 400 clamp(6px, 1.6vw, 8px)/1 Arial, sans-serif; color: #8A978F; letter-spacing: .04em; }
.rc__seguro::before { content: '\1F512\FE0E  '; }

/* dourada */
.rc__ouro small { margin-top: 5%; font: 700 clamp(6.5px, 1.8vw, 8.5px)/1.25 Arial, sans-serif; letter-spacing: .04em; color: #6B4E0E; }
.rc__ouro .rc__foto { margin: 7% 0 5%; }
.rc__confete { position: absolute; inset: 0; overflow: hidden; }
.rc__confete i {
    position: absolute; top: -8%;
    width: 4%; height: 2.4%;
    border-radius: 1px;
    opacity: 0;
    animation: rc-confete 1.8s linear forwards;
}
.rc__confete i:nth-child(odd) { background: #FFFFFF; }
.rc__confete i:nth-child(even) { background: var(--jg-0a7a00, #0A7A00); }
.rc__confete i:nth-child(3n) { background: #F9C6DE; }
.rc__confete i:nth-child(1)  { left: 8%;  animation-delay: .05s; }
.rc__confete i:nth-child(2)  { left: 20%; animation-delay: .3s; }
.rc__confete i:nth-child(3)  { left: 32%; animation-delay: .12s; }
.rc__confete i:nth-child(4)  { left: 44%; animation-delay: .4s; }
.rc__confete i:nth-child(5)  { left: 56%; animation-delay: .2s; }
.rc__confete i:nth-child(6)  { left: 68%; animation-delay: .5s; }
.rc__confete i:nth-child(7)  { left: 80%; animation-delay: .08s; }
.rc__confete i:nth-child(8)  { left: 90%; animation-delay: .35s; }
.rc__confete i:nth-child(9)  { left: 26%; animation-delay: .6s; }
.rc__confete i:nth-child(10) { left: 74%; animation-delay: .25s; }
@keyframes rc-confete {
    0%   { opacity: 1; transform: translateY(0) rotate(0deg); }
    100% { opacity: .9; transform: translateY(1100%) rotate(540deg); }
}

/* comprovante padrão verde */
.rc__padrao { justify-content: flex-start; padding: 0; gap: 0; }
.rc__faixa-ok {
    width: 100%;
    box-sizing: border-box;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 16% 8% 9%;
    background: linear-gradient(180deg, var(--jg-2aa152, #2AA152), var(--jg-0a7a00, #0A7A00));
}
.rc__faixa-ok .rc__check { width: 36%; }
.rc__faixa-ok b { color: #FFFFFF; font: 700 clamp(9px, 2.5vw, 12px)/1.2 Arial, sans-serif; }
.rc__comprovante { width: 84%; margin: 8% 0 6%; }
.rc__comprovante div {
    display: flex; justify-content: space-between;
    padding: 4% 0;
    border-bottom: 1px dashed #DDE3DF;
    font: 400 clamp(7px, 1.9vw, 9px)/1.2 Arial, sans-serif; color: #6B7A70;
}
.rc__padrao .rc__comprovante span { font: inherit; color: #6B7A70; }
.rc__comprovante b { color: #2E3A33; font-size: 1em; font-weight: 700; }
.rc__padrao .rc__obrigado { padding: 0 8%; font: italic 700 clamp(8px, 2.2vw, 10.5px)/1.3 Georgia, serif; color: var(--jg-14532d, #14532d); }

@media (prefers-reduced-motion: reduce) {
    .rc__confete i { animation: none; opacity: .9; transform: translateY(600%) rotate(30deg); }
}
