/* cupons.css — frente Q4, 06/11/2026 (faixa de cupons + tela "Cupons de desconto"; prefixo cp-) */

/* ── faixa verde-clara ── */
.cp-faixa { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 10px 14px; border: 0; border-radius: 14px; background: #E6F6EC; color: #0A5C39; font: inherit; text-align: left; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.cp-faixa .cp-ico { display: inline-flex; flex: none; }
.cp-faixa .cp-tit { font-size: 14px; font-weight: 800; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-faixa .cp-est { flex: 0 0 auto; }
.cp-faixa .cp-est { margin-left: auto; font-size: 13px; font-weight: 700; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0A7C4C; }
.cp-faixa.is-on .cp-est { color: #0A5C39; }
.cp-faixa.is-disp .cp-est { color: #0A7C4C; font-weight: 800; }
.cp-faixa .cp-chev { flex: none; opacity: .8; }
.cp-faixa:active { filter: brightness(.97); }
.cp-faixa:focus-visible { outline: 3px solid #0A7C4C; outline-offset: 2px; }

/* ── tela ── */
html.cp-trava, html.cp-trava body { overflow: hidden; }
.cp-ov { position: fixed; inset: 0; z-index: 1300; background: #F4F4F6; display: flex; justify-content: center; opacity: 0; transform: translateX(24px); transition: opacity .2s ease, transform .22s ease; }
.cp-ov.is-in { opacity: 1; transform: none; }
.cp-tela { position: relative; width: 100%; max-width: 480px; height: 100%; display: flex; flex-direction: column; background: #F4F4F6; color: var(--rd-ink, #0B0F19); outline: 0; font-family: inherit; }
.cp-hdr { display: flex; align-items: center; gap: 4px; padding: 10px 12px 10px 8px; background: #fff; }
.cp-hdr h2 { flex: 1; margin: 0; font-size: 20px; font-weight: 800; }
.cp-voltar { width: 44px; height: 44px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; color: inherit; cursor: pointer; border-radius: 12px; }
.cp-regras { min-height: 44px; padding: 0 8px; border: 0; background: none; font: inherit; font-size: 15px; font-weight: 600; color: inherit; cursor: pointer; }
.cp-campo-wrap { background: #fff; padding: 4px 18px 16px; }
.cp-campo { display: flex; align-items: center; gap: 8px; background: #F2F2F4; border-radius: 999px; padding: 6px 6px 6px 18px; }
.cp-inp { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font: inherit; font-size: 16px; color: inherit; outline: 0; text-transform: uppercase; }
.cp-inp::placeholder { color: #9A9AA3; text-transform: none; }
.cp-campo:focus-within { box-shadow: 0 0 0 2px var(--rd-brand, #F9D515); }
.cp-campo:has(.cp-inp.is-erro) { box-shadow: 0 0 0 2px #D92D20; }
.cp-resgatar { min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px; background: #fff; font: inherit; font-size: 16px; font-weight: 800; color: inherit; cursor: pointer; }
.cp-resgatar[disabled] { opacity: .6; }
.cp-erro { margin: 8px 6px 0; min-height: 0; font-size: 13px; font-weight: 600; color: #D92D20; }
.cp-erro:empty { display: none; }
.cp-corpo { flex: 1; overflow-y: auto; padding: 0 18px 120px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.cp-sec { margin: 26px 0 12px; font-size: 19px; font-weight: 800; }
.cp-nao { display: flex; align-items: center; justify-content: space-between; min-height: 56px; padding: 8px 18px; background: #fff; border-radius: 18px; font-size: 17px; font-weight: 600; cursor: pointer; }
.cp-radio { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #C9C9D0; background: #fff; position: relative; transition: border-color .15s; }
.cp-radio.on { border-color: #1A1A1A; background: #F9D515; }
.cp-radio.on::after { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: #1A1A1A; }

/* ── ticket com recorte semicircular nas laterais ── */
.cp-tk { position: relative; margin-top: 12px; border-radius: 20px; background: #fff; cursor: pointer; --cp-fundo: #F4F4F6;
  -webkit-mask: radial-gradient(circle 11px at 0 64px, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 64px, transparent 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 11px at 0 64px, transparent 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 11px at 100% 64px, transparent 98%, #000) right / 51% 100% no-repeat; }
.cp-tk-corpo { padding: 16px 18px 16px; }
.cp-tk-topo { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.cp-tk-val { font-size: 30px; font-weight: 900; letter-spacing: -.5px; line-height: 1.1; }
.cp-tk-nome { margin-top: 4px; font-size: 17px; font-weight: 700; }
.cp-tk-nome small { margin-left: 4px; padding: 2px 8px; border-radius: 6px; background: #F2F2F4; font-size: 12px; font-weight: 700; letter-spacing: .5px; color: #5B5B66; vertical-align: 2px; }
.cp-tk-sub { margin-top: 6px; font-size: 14px; color: #6B6B76; }
.cp-tk[aria-checked="true"] { box-shadow: inset 0 0 0 0 transparent; outline: 2px solid #1A1A1A; outline-offset: -2px; }
.cp-tk:focus-visible, .cp-nao:focus-visible { outline: 3px solid #0A7C4C; outline-offset: 2px; }
.cp-tk.is-off { cursor: default; }
.cp-tk.is-off .cp-tk-val, .cp-tk.is-off .cp-tk-nome, .cp-tk.is-off .cp-tk-sub { opacity: .5; }
.cp-motivo { margin-top: 14px; }
.cp-motivo b { display: block; font-size: 17px; font-weight: 800; color: #FF8A00; }
.cp-motivo p { margin: 4px 0 0; font-size: 15px; line-height: 1.35; color: #1A1A1A; }

/* ── vazio ── */
.cp-vazio { text-align: center; padding: 18px 8px 4px; color: #6B6B76; }
.cp-vazio p { margin: 8px 0 4px; font-size: 16px; font-weight: 700; color: #1A1A1A; }
.cp-vazio small { font-size: 14px; }
.cp-vazio svg { max-width: 160px; height: auto; }

/* ── rodapé fixo ── */
.cp-rodape { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); background: #fff; box-shadow: 0 -6px 18px rgba(11, 15, 25, .06); }
.cp-aplicar { width: 100%; min-height: 52px; border: 0; border-radius: 999px; background: var(--rd-brand, #F9D515); color: #1A1A1A; font: inherit; font-size: 17px; font-weight: 800; cursor: pointer; transition: transform .15s, background .2s; }
.cp-aplicar:active { transform: scale(.98); }
.cp-aplicar[disabled] { opacity: .6; }
.cp-aplicar.is-ok { background: #0A7C4C; color: #fff; }

/* ── regras ── */
.cp-regras-folha { position: absolute; inset: 0; z-index: 5; background: rgba(11, 15, 25, .5); display: flex; align-items: flex-end; }
.cp-regras-cx { width: 100%; background: #fff; border-radius: 24px 24px 0 0; padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); outline: 0; animation: cpSobe .22s ease; }
.cp-regras-cx h3 { margin: 0 0 10px; font-size: 19px; font-weight: 800; }
.cp-regras-cx ul { margin: 0 0 18px; padding-left: 20px; font-size: 15px; line-height: 1.5; }

/* ── efeitos: carimbo + confete ── */
.cp-tk.cp-carimbo { animation: cpCarimbo .5s cubic-bezier(.3, 1.6, .5, 1); }
.cp-confete { position: absolute; left: 50%; top: 45%; width: 0; height: 0; pointer-events: none; z-index: 6; }
.cp-confete i { position: absolute; width: 8px; height: 12px; border-radius: 2px; opacity: 0; animation: cpConfete .9s ease-out forwards; }
@keyframes cpCarimbo { 0% { transform: scale(1.18) rotate(-4deg); } 60% { transform: scale(.97) rotate(1.5deg); } 100% { transform: none; } }
@keyframes cpConfete { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), calc(var(--dy) + 60px)) rotate(240deg); } }
@keyframes cpSobe { from { transform: translateY(40px); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cp-ov { transition: none; transform: none; }
  .cp-tk.cp-carimbo, .cp-regras-cx { animation: none; }
  .cp-aplicar { transition: none; }
}
