/* sorteio.css — brindes/sorteio dos eventos oficiais (db/migrations/038).
   Celebração da ganhadora (overlay full-screen, molde .tk-validado do ingresso, mas fixed),
   tela admin do sorteio e o badge 🎁/🎲 dos cards. */

/* ══════════ Badge 🎁/🎲 nos cards ══════════ */
.selo-bs {
    display: inline-flex; align-items: center; gap: 3px;
    border-radius: 9999px; padding: 3px 9px;
    font-size: 11px; font-weight: 700; line-height: 1;
    background: var(--color-lavender-light); color: #9b59d6;
}
/* Sobre cover escuro (Home/detalhe): pílula translúcida clara, como o .det-cover-chip. */
.selo-bs.sobre-cover {
    background: rgba(255, 255, 255, 0.25); color: #fff;
    backdrop-filter: blur(4px);
}

/* ══════════ Celebração da ganhadora (overlay global) ══════════ */
.sorteio-cel {
    position: fixed; inset: 0; z-index: 4000;
    background: linear-gradient(160deg, #ddb1f7 0%, #ff6e1f 100%);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 16px; text-align: center; padding: 32px; overflow: hidden;
    animation: srtFade .35s ease-out;
}
@keyframes srtFade { from { opacity: 0; } to { opacity: 1; } }

.sorteio-cel-conf { position: absolute; font-size: 22px; animation: srtFloat 2.4s ease-out infinite; }
@keyframes srtFloat {
    0% { transform: translateY(0) rotate(0); opacity: 0; }
    15% { opacity: 1; }
    100% { transform: translateY(-180px) rotate(45deg); opacity: 0; }
}

.sorteio-cel-ring {
    width: 100px; height: 100px; border-radius: 50%;
    background: rgba(255, 255, 255, 0.24);
    display: flex; align-items: center; justify-content: center;
    animation: srtPop .5s ease-out;
}
.sorteio-cel-in {
    width: 74px; height: 74px; border-radius: 50%; background: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 38px;
}
@keyframes srtPop { 0% { transform: scale(0.6); opacity: 0; } 60% { transform: scale(1.14); } 100% { transform: scale(1); opacity: 1; } }

.sorteio-cel-tit { font-family: var(--font-display); font-size: 30px; font-weight: 700; color: #fff; }
.sorteio-cel-premio {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.9); color: #2b2318;
    border-radius: 9999px; padding: 8px 20px; font-weight: 700; font-size: 16px;
    max-width: 90%;
}
.sorteio-cel-sub {
    font-size: 15px; color: rgba(255, 255, 255, 0.95); margin-top: 2px;
    max-width: 420px; line-height: 1.4;
}
.sorteio-cel-btn {
    margin-top: 12px; border: none; cursor: pointer;
    background: #fff; color: #d45800;
    border-radius: 9999px; padding: 13px 32px; font-weight: 700; font-size: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

/* ══════════ Tela admin do sorteio ══════════ */
.srt-page { max-width: 640px; margin: 0 auto; }
.srt-card {
    background: #fff; border-radius: 20px; padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08); margin-bottom: 16px;
}
.srt-elegiveis { display: flex; align-items: center; gap: 12px; }
.srt-elegiveis-n {
    font-family: var(--font-display); font-size: 34px; font-weight: 700; color: #ff6e1f; line-height: 1;
}
.srt-elegiveis-lbl { font-size: 13px; color: var(--color-text-secondary); }

.srt-campo { margin-top: 14px; }
.srt-campo label { display: block; font-size: 12px; font-weight: 700; color: var(--color-text-secondary); margin-bottom: 5px; }
.srt-campo select, .srt-campo input, .srt-campo textarea {
    width: 100%; background: var(--color-cream);
    border: 1.5px solid rgba(132, 153, 183, 0.25); border-radius: 12px;
    padding: 12px 14px; font: inherit; font-size: 15px; color: var(--color-text);
}
.srt-campo textarea { resize: vertical; min-height: 64px; }
.srt-progresso { margin: 12px 0 0; font-size: 13px; font-weight: 600; color: #9b59d6; }

.srt-sortear-btn {
    width: 100%; margin-top: 16px; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 9px;
    background: #ff6e1f; color: #fff;
    border-radius: 9999px; padding: 15px; font-weight: 600; font-size: 16px;
    box-shadow: 0 4px 16px rgba(255, 110, 31, 0.35);
}
.srt-sortear-btn:disabled { background: var(--color-disabled-bg); color: var(--color-disabled-text); box-shadow: none; cursor: not-allowed; }

/* Preview do ícone do prêmio ao lado do seletor. */
.srt-premio-preview {
    width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--color-lavender-light); color: #9b59d6;
}
/* Tile do ícone no histórico. */
.srt-hist-tile {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #faf7ee; color: #ff6e1f;
}

/* Revelação animada da ganhadora dentro da tela admin (não é a overlay da ganhadora). */
.srt-revelacao {
    margin-top: 16px; border-radius: 16px; padding: 22px;
    background: linear-gradient(135deg, #ddb1f7, #ff6e1f); color: #fff;
    text-align: center; position: relative; overflow: hidden;
    animation: srtPop .5s ease-out;
}
.srt-revelacao-lbl { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; opacity: .9; }
.srt-revelacao-nome { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin-top: 4px; }
.srt-revelacao-premio { margin-top: 6px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; }

.srt-hist-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid rgba(132, 153, 183, 0.14);
}
.srt-hist-item:last-child { border-bottom: none; }
.srt-hist-nome { font-weight: 700; color: var(--color-text); font-size: 15px; }
.srt-hist-premio { font-size: 13px; color: var(--color-text-secondary); }
.srt-hist-time { margin-left: auto; font-size: 12px; color: var(--color-text-muted); white-space: nowrap; }

/* ══════════ Seções de brindes/sorteio no detalhe do evento ══════════ */
/* Cabeçalho de seção: tile de ícone + título (molde do protótipo). */
.det-bs-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.det-bs-head-tile {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.det-bs-head-tile.brinde  { background: var(--color-orange-light); color: #ff6e1f; }
.det-bs-head-tile.sorteio { background: var(--color-lavender-light); color: #9b59d6; }

/* Brindes — cards com tile gradiente (ícone de presente branco) + badge "Para todas". */
.det-brinde-lista { display: flex; flex-direction: column; gap: 10px; margin-bottom: 28px; }
.det-brinde-card {
    display: flex; align-items: center; gap: 13px;
    background: #fff; border-radius: 14px; padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}
.det-brinde-tile {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #ddb1f7, #ff6e1f);
}
.det-brinde-nome { font-family: var(--font-display); font-size: 16px; font-weight: 700; color: var(--color-text); }
.det-brinde-desc { font-size: 13px; color: var(--color-text-muted); }
.det-brinde-badge {
    margin-left: auto; white-space: nowrap;
    background: rgba(180, 181, 54, 0.16); color: #5c5e00;
    font-size: 11px; font-weight: 700; border-radius: 50px; padding: 5px 11px;
}

/* Sorteio — card com prêmios (tile branco com o ícone escolhido) e botão "Sortear ganhadora". */
.det-sorteio-card {
    background: #fff; border-radius: 18px; padding: 20px 22px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05); margin-bottom: 28px;
}
.det-sorteio-sub { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }
.det-premio-lista { display: flex; flex-direction: column; gap: 8px; margin: 16px 0; }
.det-premio-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 12px; border-radius: 12px; background: #faf7ee;
}
.det-premio-tile {
    width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
}
.det-premio-tile.laranja { color: #ff6e1f; }
.det-premio-tile.oliva   { color: #b4b536; }
.det-premio-nome { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--color-text); }
.det-premio-desc { font-size: 12px; color: var(--color-text-muted); }
.det-premio-qtd { margin-left: auto; white-space: nowrap; font-size: 12px; color: var(--color-text-muted); font-weight: 600; }
.det-sorteio-vazio { font-size: 14px; color: var(--color-text-secondary); margin: 14px 0; }
.det-sortear-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    background: #ff6e1f; color: #fff; text-decoration: none;
    border-radius: 50px; padding: 13px 24px; font-size: 14px; font-weight: 600;
    box-shadow: 0 4px 16px rgba(255, 110, 31, 0.35);
}

/* Marcador de "sorteada" na lista de confirmadas do detalhe (troféu + prêmio). */
.det-premiada {
    display: inline-flex; align-items: center; gap: 4px;
    background: var(--color-lavender-light); color: #9b59d6;
    border-radius: 50px; padding: 2px 9px; font-size: 11px; font-weight: 700;
    max-width: 100%; overflow: hidden;
}
.det-premiada svg { flex-shrink: 0; }

/* ══════════ Editor de itens (brindes/prêmios) no form criar/editar ══════════ */
.criar-itens { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.criar-item {
    display: flex; gap: 8px; align-items: center;
    background: var(--color-cream); border-radius: 12px; padding: 8px;
}
.criar-item input { flex: 1; min-width: 0; border: 1.5px solid rgba(132, 153, 183, 0.25); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: 14px; background: #fff; }
.criar-item-x {
    flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
    border: none; cursor: pointer; background: #fdeceb; color: var(--color-danger); font-size: 16px; line-height: 1;
}
.criar-item-add {
    align-self: flex-start; border: 1.5px dashed rgba(132, 153, 183, 0.4);
    background: transparent; color: var(--color-text-secondary); cursor: pointer;
    border-radius: 9999px; padding: 8px 16px; font-size: 13px; font-weight: 500;
}

/* Prêmio de sorteio no form: linha de campos + seletor de ícone. */
.criar-premio {
    display: flex; flex-direction: column; gap: 8px;
    background: var(--color-cream); border-radius: 12px; padding: 8px;
}
.criar-icone-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.criar-icone-op {
    width: 34px; height: 34px; border-radius: 10px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    background: #fff; border: 1.5px solid rgba(132, 153, 183, 0.25); color: var(--color-text-muted);
    transition: border-color .12s, color .12s, background .12s;
}
.criar-icone-op:hover { color: var(--color-text-secondary); }
.criar-icone-op.sel {
    border-color: #ff6e1f; color: #ff6e1f; background: var(--color-orange-light);
}
.criar-premio-qtd { display: flex; align-items: center; gap: 8px; }
.criar-premio-qtd label { font-size: 12px; font-weight: 600; color: var(--color-text-secondary); }
.criar-premio-qtd input {
    width: 72px; border: 1.5px solid rgba(132, 153, 183, 0.25); border-radius: 10px;
    padding: 8px 10px; font: inherit; font-size: 14px; background: #fff;
}
