/* RIFAS PARAGUAY - Custom Styles */

:root {
  --rp-red: #C8102E;
  --rp-blue: #111111;
  --rp-white: #FFFFFF;
  --rp-gold: #D4A017;
  --rp-bg: #FFFFFF;
  --rp-text: #111111;
  --rp-text-light: #6B7280;
  --rp-border: #E5E7EB;
}

.text-rp-blue { color: var(--rp-blue); }
.text-rp-red { color: var(--rp-red); }
.text-rp-gold { color: var(--rp-gold); }

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--rp-bg);
  color: var(--rp-text);
}

/* Hero: negro limpio, sin gradiente ni efectos */
.hero-gradient {
  background: #0a0a0a;
}

/* Number grid */
.number-cell {
  width: 38px;
  height: 38px;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 2px solid transparent;
  user-select: none;
}

.number-cell.available {
  background: #10B981;
  color: #fff;
}
.number-cell.available:hover {
  background: #059669;
  transform: scale(1.1);
}
.number-cell.selected,
.number-cell.available.selected {
  background: #F97316 !important;
  color: #fff !important;
  border-color: #fff;
  box-shadow: 0 0 0 2px #F97316;
  transform: scale(1.1);
}
.number-cell.sold {
  background: #DC2626;
  color: #fff;
  cursor: not-allowed;
  opacity: 0.85;
  border: 2px solid #7F1D1D;
}
.number-cell.reserved {
  background: #9CA3AF;
  color: #fff;
  cursor: not-allowed;
  border: 2px dashed #4B5563;
}
.number-cell.winner {
  background: #C8102E;
  color: #fff;
  cursor: not-allowed;
  animation: pulse-rojo 1.5s infinite;
}

@keyframes pulse-rojo {
  0%, 100% { box-shadow: 0 0 0 0 rgba(200, 16, 46, 0.5); }
  50% { box-shadow: 0 0 0 6px rgba(200, 16, 46, 0); }
}

/* Progress bar */
.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #E5E7EB;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rp-blue), var(--rp-red));
  transition: width 0.6s ease;
}

/* Countdown */
.countdown-unit {
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 60px;
  text-align: center;
  color: #fff;
}
.countdown-unit .value {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  color: #fff;
}
.countdown-unit .label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
  color: rgba(255, 255, 255, 0.9);
}

/* Countdown en pantallas chicas: que nunca desborde el ancho */
@media (max-width: 640px) {
  .countdown-unit {
    padding: 8px 10px;
    min-width: 46px;
  }
  .countdown-unit .value {
    font-size: 1.3rem;
  }
  .countdown-unit .label {
    font-size: 0.55rem;
  }
}
@media (max-width: 360px) {
  .countdown-unit {
    padding: 6px 8px;
    min-width: 40px;
  }
  .countdown-unit .value {
    font-size: 1.15rem;
  }
}

/* Card hover */
.raffle-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Rifa única: ocupa las 3 columnas y se centra con ancho máximo */
.raffle-single {
  grid-column: 1 / -1;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Punto verde titilando (badge ACTIVA) */
.dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  animation: dotPulse 1.2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes dotPulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}
.raffle-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

/* Combo cards */
.combo-card {
  border: 2px solid var(--rp-border);
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}
.combo-card:hover {
  border-color: var(--rp-blue);
  background: #EFF6FF;
}
.combo-card.active {
  border-color: var(--rp-blue);
  background: #DBEAFE;
  box-shadow: 0 0 0 3px rgba(0, 56, 168, 0.2);
}
.combo-card .discount-badge {
  background: var(--rp-red);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  display: inline-block;
}

/* WhatsApp button */
.whatsapp-btn {
  background: #25D366;
  color: #fff;
  transition: background 0.2s;
}
.whatsapp-btn:hover {
  background: #20BA5A;
}

/* Section IDs for scroll nav */
section[id] {
  scroll-margin-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F3F4F6; }
::-webkit-scrollbar-thumb { background: #9CA3AF; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #6B7280; }

/* Loading skeleton */
.skeleton {
  background: linear-gradient(90deg, #E5E7EB 25%, #F3F4F6 50%, #E5E7EB 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 8px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Social proof toasts (marketing) */
#social-proof-toasts {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  pointer-events: none;
}

.sp-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  animation: sp-in 0.35s ease;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.sp-toast.sp-hide {
  opacity: 0;
  transform: translateY(10px);
}

.sp-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #1d4ed8;
  color: white;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.sp-body p { margin: 0; }

.sp-text {
  font-size: 0.82rem;
  color: #374151;
  line-height: 1.35;
}

.sp-text strong { color: #111827; }

.sp-time {
  font-size: 0.7rem;
  color: #9ca3af;
  margin-top: 2px !important;
}

@keyframes sp-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
  #social-proof-toasts { max-width: 260px; bottom: 12px; left: 12px; }
}

/* Verificador de ticket */
[x-cloak] { display: none !important; }

/* Sticky selection footer (rifa.html) */
.sel-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 2px solid #F97316;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 60;
  padding: 12px 16px;
}

.sel-footer-inner {
  max-width: 1152px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.sel-info { flex: 1; min-width: 160px; }
.sel-title { font-size: 0.9rem; font-weight: 600; color: #1f2937; }
.sel-nums { font-size: 0.75rem; color: #6b7280; margin-top: 2px; word-break: break-all; }

.sel-total { text-align: right; }
.sel-total-label { font-size: 0.7rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.4px; }
.sel-total-valor { font-size: 1.3rem; font-weight: 900; color: #F97316; }

.sel-btn {
  background: #F97316;
  color: #fff;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
  font-size: 0.95rem;
}
.sel-btn:hover { background: #ea580c; }

@media (max-width: 640px) {
  .sel-footer-inner { gap: 10px; }
  .sel-btn { width: 100%; }
}
