﻿/* Sorteo presencial dixital â€” stadium lighting, TV-ready, no CDN */
:root {
  --navy: #0a1a2e;
  --navy-2: #12304f;
  --pitch: #1a6b3c;
  --gold: #c9a227;
  --gold-2: #e8c547;
  --cream: #f3f6fa;
  --glass: rgba(180, 210, 230, 0.18);
  --ink: #071018;
  --font: "Segoe UI", "Trebuchet MS", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Scoped: only fullscreen TV page locks viewport */
.draw-presencial-page,
.draw-presencial-page body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  color: var(--cream);
  background: var(--navy);
}
.draw-presencial--embed {
  position: relative;
  overflow: visible;
  font-family: var(--font);
  color: var(--cream);
  border-radius: var(--radius, 14px);
  min-height: min(720px, 85vh);
}

.draw-presencial-page body.is-scroll-mobile {
  overflow: auto;
}

.draw-presencial .stadium {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 60% 40% at 50% -5%, rgba(201, 162, 39, 0.28), transparent 55%),
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(26, 107, 60, 0.45), transparent 55%),
    linear-gradient(180deg, #0d2240 0%, #0a1a2e 45%, #071525 100%);
  pointer-events: none;
}
.draw-presencial-page,
.draw-presencial-page body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--navy, #0a1a2e);
}
.draw-presencial--tv {
  min-height: 100vh;
  min-height: 100dvh;
}
.draw-presencial--tv .stadium {
  position: fixed;
}
.draw-presencial--tv .app {
  min-height: 100vh;
  min-height: 100dvh;
}

.stadium::before {
  content: "";
  position: absolute;
  inset: 8% 5% auto;
  height: 28%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.07), transparent 70%);
  filter: blur(2px);
}

.stadium::after {
  content: "";
  position: absolute;
  left: 10%;
  right: 10%;
  bottom: 0;
  height: 22%;
  background:
    repeating-linear-gradient(
      90deg,
      rgba(26, 107, 60, 0.15) 0 40px,
      rgba(26, 107, 60, 0.28) 40px 80px
    );
  mask-image: linear-gradient(180deg, transparent, #000 40%);
  opacity: 0.55;
}

.app {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: 1920px;
  margin: 0 auto;
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  background: rgba(0, 0, 0, 0.28);
  border-bottom: 1px solid rgba(201, 162, 39, 0.2);
}

.bar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-name {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-2);
  font-weight: 800;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: 0.82rem;
  color: rgba(243, 246, 250, 0.7);
}

.bar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 16px;
  min-height: 0;
  overflow: hidden;
}

.panel {
  width: min(920px, 100%);
  text-align: center;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  animation: panelIn 0.45s ease;
}

.panel.is-active,
.panel:not([hidden]) {
  display: flex;
}

.panel[hidden] {
  display: none !important;
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero-logo {
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.panel h1 {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.prize-line,
.sponsor-line,
.meta-line {
  margin: 0;
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  color: rgba(243, 246, 250, 0.88);
}

.prize-line span {
  color: var(--gold-2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75em;
  margin-right: 8px;
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 14px 26px;
  font: inherit;
  font-weight: 750;
  font-size: 1rem;
  cursor: pointer;
  color: var(--ink);
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 8px 22px rgba(201, 162, 39, 0.35);
  min-height: 48px;
}

.btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  margin-top: 8px;
  font-size: 1.1rem;
  padding: 16px 32px;
}

.btn-quiet {
  background: rgba(255, 255, 255, 0.06);
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.btn-quiet[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--gold-2);
}

/* Seal */
.seal {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 24px;
  padding: 36px 40px;
  box-shadow: 0 0 0 8px rgba(201, 162, 39, 0.08);
}

.seal-lock {
  font-size: 2.4rem;
  margin-bottom: 8px;
}

.seal h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--gold-2);
}

.seal-count {
  margin: 0;
  font-size: 1.25rem;
}

.seal-verify {
  margin: 12px 0 0;
  font-size: 0.9rem;
  color: rgba(243, 246, 250, 0.65);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Vessel scene */
.phase-label {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  color: var(--gold-2);
  letter-spacing: 0.04em;
}

.phase-status {
  margin: 0;
  color: rgba(243, 246, 250, 0.7);
}

.vessel-scene {
  position: relative;
  width: min(520px, 92vw);
  height: min(420px, 52vh);
  display: grid;
  place-items: center;
  perspective: 900px;
}

.vessel {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  transform-style: preserve-3d;
}

.vessel-glow {
  position: absolute;
  width: 70%;
  height: 40%;
  bottom: 8%;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(201, 162, 39, 0.35), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}

/* Style A â€” transparent urn */
.vessel-urn .vessel-body {
  position: relative;
  width: min(280px, 70%);
  height: min(340px, 90%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vessel-urn .vessel-rim {
  width: 92%;
  height: 18px;
  border-radius: 10px;
  background: linear-gradient(180deg, #d8dee8, #8a93a3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  z-index: 3;
}

.vessel-urn .vessel-glass {
  position: relative;
  flex: 1;
  width: 88%;
  margin-top: -4px;
  border-radius: 12px 12px 40% 40% / 12px 12px 28% 28%;
  background:
    linear-gradient(105deg, rgba(255, 255, 255, 0.28) 0%, transparent 28%, transparent 72%, rgba(255, 255, 255, 0.12) 100%),
    linear-gradient(180deg, rgba(160, 200, 230, 0.22), rgba(80, 120, 160, 0.12));
  border: 2px solid rgba(220, 230, 240, 0.45);
  box-shadow:
    inset 0 0 40px rgba(255, 255, 255, 0.12),
    inset -12px 0 24px rgba(0, 0, 0, 0.15),
    0 20px 40px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  backdrop-filter: blur(1px);
}

.vessel-urn .vessel-base {
  width: 70%;
  height: 28px;
  margin-top: -6px;
  border-radius: 8px;
  background: linear-gradient(180deg, #9aa3b2, #4a5568);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

/* Style B â€” sports drum */
.vessel[data-style="drum"] .vessel-body {
  width: min(360px, 88%);
  height: min(280px, 80%);
}

.vessel[data-style="drum"] .vessel-rim {
  display: none;
}

.vessel[data-style="drum"] .vessel-glass {
  width: 100%;
  height: 78%;
  border-radius: 50% / 42%;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.25), transparent 40%),
    linear-gradient(160deg, #2a4a6e, #142438);
  border: 6px solid #c9a227;
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.35),
    0 16px 40px rgba(0, 0, 0, 0.45);
}

.vessel[data-style="drum"] .vessel-base {
  width: 55%;
  height: 22px;
  margin-top: 8px;
  border-radius: 6px;
  background: #1a2a3e;
  border: 2px solid rgba(201, 162, 39, 0.5);
}

/* Style C â€” envelope stage */
.vessel[data-style="envelope"] .vessel-body {
  width: min(400px, 90%);
  height: min(260px, 75%);
}

.vessel[data-style="envelope"] .vessel-rim,
.vessel[data-style="envelope"] .vessel-base {
  display: none;
}

.vessel[data-style="envelope"] .vessel-glass {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.25)),
    #1a3352;
  border: 1px solid rgba(201, 162, 39, 0.35);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45);
  display: grid;
  place-items: center;
}

.vessel[data-style="envelope"] .vessel-glass::before {
  content: "";
  position: absolute;
  inset: 12%;
  border: 1px dashed rgba(201, 162, 39, 0.35);
  border-radius: 8px;
  pointer-events: none;
}

.ballots {
  position: absolute;
  inset: 8%;
  transform-style: preserve-3d;
}

.ballot {
  position: absolute;
  width: 44px;
  height: 28px;
  border-radius: 3px;
  background:
    linear-gradient(135deg, #f7f3e8 0%, #e8dfc8 50%, #d9ceb0 100%);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transform-origin: center center;
  will-change: transform;
}

.ballot::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: rgba(14, 36, 63, 0.12);
  border-radius: 3px 0 0 3px;
}

.ballot::after {
  content: "";
  position: absolute;
  inset: 5px 6px;
  border-top: 1px solid rgba(14, 36, 63, 0.12);
  border-bottom: 1px solid rgba(14, 36, 63, 0.08);
  opacity: 0.8;
}

.ballot.is-capsule {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 28%, #fff6d0, #c9a227 55%, #8a6a10);
}

.ballot.is-capsule::before,
.ballot.is-capsule::after {
  display: none;
}

.ballot.is-envelope-card {
  width: 72px;
  height: 48px;
  background: linear-gradient(160deg, #faf6ec, #e4d7b5);
}

.ballot.is-lit {
  box-shadow:
    0 0 0 2px var(--gold-2),
    0 0 24px rgba(232, 197, 71, 0.85),
    0 8px 16px rgba(0, 0, 0, 0.4);
  z-index: 5;
}

.ballot.is-exiting {
  z-index: 10;
}

/* Particles */
.particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(232, 197, 71, 0.55);
  pointer-events: none;
}

/* Tension / open */
.tension-text {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 2rem);
  color: var(--gold-2);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.winner-ballot {
  position: relative;
  width: min(280px, 70vw);
  height: min(180px, 28vh);
  transform-style: preserve-3d;
  transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.winner-ballot.is-zoom {
  transform: scale(1.12);
}

.winner-ballot.is-open {
  transform: rotateY(180deg) scale(1.08);
}

.ballot-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 12px;
  display: grid;
  place-content: center;
  gap: 8px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45);
}

.ballot-back {
  background:
    linear-gradient(135deg, #efe6d0, #d4c49a);
  border: 2px solid rgba(14, 36, 63, 0.15);
}

.ballot-fold {
  display: block;
  width: 70%;
  height: 2px;
  margin: 0 auto;
  background: rgba(14, 36, 63, 0.15);
  box-shadow: 0 18px 0 rgba(14, 36, 63, 0.1), 0 36px 0 rgba(14, 36, 63, 0.08);
}

.ballot-front {
  background: linear-gradient(160deg, #16355c, #0e243f);
  border: 2px solid var(--gold);
  transform: rotateY(180deg);
  color: var(--cream);
  padding: 20px;
}

.ballot-num {
  margin: 0;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  letter-spacing: 0.12em;
  color: var(--gold-2);
  font-weight: 800;
}

.ballot-name {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 800;
}

/* Celebrate */
#phaseCelebrate {
  position: relative;
}

.confetti {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.celebrate-card {
  position: relative;
  z-index: 1;
  background: rgba(10, 26, 46, 0.82);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 24px;
  padding: 28px 32px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 60px rgba(0, 0, 0, 0.45);
  display: grid;
  gap: 8px;
  justify-items: center;
  max-width: 560px;
}

.win-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: rgba(243, 246, 250, 0.65);
}

.celebrate-card h2 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--gold-2);
}

.win-prize,
.win-sponsor {
  margin: 0;
  font-size: 1.1rem;
}

.verify-code {
  margin: 8px 0 4px;
  font-size: 0.95rem;
}

.verify-code code {
  display: inline-block;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.04em;
  color: var(--gold-2);
}

.celebrate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

/* QA dock */
.qa-dock {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  padding: 10px 16px 14px;
  background: rgba(0, 0, 0, 0.4);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
}

.qa-dock label {
  color: rgba(243, 246, 250, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

.qa-dock select {
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(14, 36, 63, 0.9);
  color: var(--cream);
  grid-row: 2;
}

.qa-dock select:first-of-type {
  grid-column: 1;
}

.qa-dock select:last-of-type {
  grid-column: 2;
}

.qa-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(243, 246, 250, 0.45);
  font-size: 0.72rem;
}

/* Reduced motion */
.reduce-motion .ballot,
.reduce-motion .winner-ballot,
.reduce-motion .panel {
  transition: opacity 0.35s ease !important;
  animation: none !important;
}

.reduce-motion .winner-ballot.is-open {
  transform: none;
}

.reduce-motion .winner-ballot .ballot-back {
  display: none;
}

.reduce-motion .winner-ballot .ballot-front {
  transform: none;
}

/* TV / fullscreen */
:fullscreen .qa-dock,
:-webkit-full-screen .qa-dock {
  opacity: 0.35;
}

:fullscreen .panel h1,
:-webkit-full-screen .panel h1 {
  font-size: 3rem;
}

:fullscreen .celebrate-card h2,
:-webkit-full-screen .celebrate-card h2 {
  font-size: 3.4rem;
}

@media (max-width: 700px) {
  .draw-presencial-page body.is-scroll-mobile {
    overflow: auto;
  }
  .app {
    height: auto;
    min-height: 100%;
  }
  .qa-dock {
    grid-template-columns: 1fr;
  }
  .qa-dock select {
    grid-column: 1 !important;
    grid-row: auto;
  }
  .bar-actions .btn {
    padding: 10px 14px;
    font-size: 0.85rem;
    min-height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .panel {
    animation: none;
  }
}

/* Hide scrollbars in TV feel */
.app::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* —— Production overrides: embed in public layout + club theme —— */
.draw-presencial {
  --navy: var(--primary-strong, #26266f);
  --navy-2: var(--primary, #333399);
  --gold: var(--accent, #ffcc00);
  --gold-2: var(--accent-strong, #d4a800);
  --cream: #f3f6fa;
  --font: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  z-index: 1;
}
.draw-presencial--embed .stadium {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
}
.draw-presencial--embed .app {
  position: relative;
  z-index: 1;
  height: auto;
  min-height: min(680px, 80vh);
  display: grid;
  grid-template-rows: auto 1fr;
  max-width: 100%;
}
.draw-presencial--embed .stage {
  min-height: 420px;
  padding: 20px 12px 28px;
}
.draw-presencial--embed .bar {
  border-radius: var(--radius, 14px) var(--radius, 14px) 0 0;
}
.qa-dock { display: none !important; }
.draw-presencial .club-logo-slot {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  margin: 0 auto;
  border-radius: 16px;
  background: #fff;
  border: 3px solid var(--gold);
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
.draw-presencial .club-logo-slot img,
.draw-presencial .club-logo-slot .club-logo,
.draw-presencial .club-logo-slot .hero-logo {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin: 0;
  filter: none;
}
.draw-presencial .club-logo-slot--sm {
  width: 64px;
  height: 64px;
  border-width: 2px;
}
.draw-presencial .club-logo-slot--sm img,
.draw-presencial .club-logo-slot--sm .club-logo {
  width: 52px;
  height: 52px;
}

/* Public layout .panel / .section h2 force gray+black — reset inside draw */
.draw-presencial .panel {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: var(--cream, #f3f6fa) !important;
  padding: 8px;
}
.draw-presencial .panel h1,
.draw-presencial .panel h2,
.draw-presencial .panel p,
.draw-presencial .meta-line,
.draw-presencial .prize-line,
.draw-presencial .sponsor-line,
.draw-presencial .phase-label,
.draw-presencial .phase-status,
.draw-presencial .tension-text {
  color: var(--cream, #f3f6fa) !important;
}
.draw-presencial .prize-line strong,
.draw-presencial .sponsor-line strong {
  color: var(--gold-2, #e8c547) !important;
}
.draw-presencial .celebrate-card {
  background: rgba(8, 18, 36, 0.96) !important;
  border: 1px solid rgba(255, 204, 0, 0.45) !important;
  color: #fff !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.draw-presencial .celebrate-card .win-eyebrow {
  color: rgba(255, 255, 255, 0.72) !important;
}
.draw-presencial .celebrate-card h2 {
  color: var(--gold-2, #ffcc00) !important;
}
.draw-presencial .celebrate-card .win-prize,
.draw-presencial .celebrate-card .win-sponsor,
.draw-presencial .celebrate-card .verify-code {
  color: #fff !important;
  font-weight: 600;
}
.draw-presencial .celebrate-card .win-prize strong,
.draw-presencial .celebrate-card .win-sponsor strong {
  color: #fff !important;
  font-weight: 800;
}
.draw-presencial .celebrate-card .verify-code code {
  color: var(--gold-2, #ffcc00) !important;
}
.draw-presencial-style-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.draw-presencial-style-picker label {
  font-weight: 700;
  color: var(--muted);
  font-size: 0.85rem;
}
.draw-presencial-style-picker select {
  max-width: 280px;
}

