/* RifaCol — estilos complementarios */

.btn-primary {
  background-color: #003893;
  color: white;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover { background-color: #002a6e; }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  background-color: #f1f5f9;
  color: #334155;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: background 0.15s, transform 0.1s;
}

.btn-secondary:hover { background-color: #e2e8f0; }
.btn-secondary:active { transform: scale(0.98); }

.btn-accent {
  background-color: #FCD116;
  color: #003893;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background 0.15s, transform 0.1s;
}

.btn-accent:hover { background-color: #facc15; }
.btn-accent:active { transform: scale(0.98); }

.btn-danger {
  background-color: #fef2f2;
  color: #CE1126;
  border: 1px solid #fecaca;
  padding: 0.625rem 1rem;
  border-radius: 0.75rem;
  font-weight: 500;
  transition: background 0.15s, transform 0.1s;
}

.btn-danger:hover { background-color: #fee2e2; }
.btn-danger:active { transform: scale(0.98); }

.input {
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  padding: 0.625rem 1rem;
  color: #1e293b;
  background: white;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.input:focus {
  outline: none;
  border-color: #003893;
  box-shadow: 0 0 0 3px rgba(0, 56, 147, 0.15);
}

.label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  margin-bottom: 0.375rem;
}

/* Modal nativo */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  border: 0;
}

.modal::backdrop {
  background: transparent;
}

.modal-box {
  background: white;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid #e2e8f0;
  width: calc(100% - 2rem);
  max-width: 32rem;
  margin: 10vh auto 0;
  padding: 1.5rem;
  max-height: 85vh;
  overflow-y: auto;
  animation: modalIn 0.2s ease-out;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Números del grid */
.number-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
  aspect-ratio: 1;
}

.number-cell:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.number-cell:active { transform: scale(0.95); }

.number-cell.available {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.number-cell.available:hover { background: #d1fae5; }

.number-cell.reserved {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.number-cell.reserved:hover { background: #fef3c7; }

.number-cell.paid {
  background: #fef2f2;
  color: #CE1126;
  border: 1px solid #fca5a5;
}

.number-cell.paid:hover { background: #fee2e2; }

.number-cell.filtered-out {
  opacity: 0.2;
  pointer-events: none;
  transform: scale(0.95);
}

/* Toast */
.toast {
  pointer-events: auto;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  color: white;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s;
  animation: toastIn 0.3s ease-out;
}

.toast.success { background: #059669; }
.toast.error   { background: #CE1126; }
.toast.info    { background: #003893; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

.draw-spin {
  animation: drawSpin 0.08s linear infinite;
}

@keyframes drawSpin {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}

html { scroll-behavior: smooth; }

@media (min-width: 1280px) {
  .xl\:grid-cols-15 {
    grid-template-columns: repeat(15, minmax(0, 1fr));
  }
}

@media (min-width: 480px) {
  .xs\:grid-cols-6 {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .xs\:inline { display: inline; }
  .xs\:hidden { display: none; }
}

.btn-card-action {
  padding: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: background 0.15s;
}

.btn-card-action:hover { background: #f8fafc; }

.badge {
  display: inline-block;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── Página de consulta (compradores) ─── */

.raffle-hero {
  position: relative;
  background: linear-gradient(135deg, #003893 0%, #002a6e 100%);
  border-radius: 1rem;
  overflow: hidden;
}

.raffle-hero-accent {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 50%;
  height: 150%;
  background: radial-gradient(circle, rgba(252, 209, 22, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  backdrop-filter: blur(4px);
}

.winner-banner {
  background: linear-gradient(135deg, #FCD116 0%, #fde68a 100%);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 4px 14px rgba(252, 209, 22, 0.3);
}

.winner-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #003893;
  background: white;
  border-radius: 0.75rem;
  padding: 0.5rem 1.25rem;
  min-width: 5rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ticket-card {
  position: relative;
  background: white;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.ticket-card-winner {
  border-color: #FCD116;
  box-shadow: 0 4px 20px rgba(252, 209, 22, 0.25);
}

.winner-ribbon {
  position: absolute;
  top: 12px;
  right: -32px;
  background: #CE1126;
  color: white;
  font-size: 0.6875rem;
  font-weight: 700;
  padding: 0.25rem 2.5rem;
  transform: rotate(45deg);
  letter-spacing: 0.05em;
}

.ticket-number-display {
  text-align: center;
  background: #f0f4ff;
  border-radius: 1rem;
  padding: 1rem 1.5rem;
  min-width: 120px;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 600;
}

.status-paid     { background: #fef2f2; color: #CE1126; }
.status-reserved { background: #fffbeb; color: #b45309; }
.status-winner   { background: #FCD116; color: #003893; }

.info-row {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.info-label {
  font-size: 0.75rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.info-value {
  font-weight: 600;
  color: #1e293b;
}

.alert-reserved {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.alert-paid {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #047857;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.alert-winner {
  background: linear-gradient(135deg, #FCD116 0%, #fde68a 100%);
  color: #003893;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.empty-result {
  background: white;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  padding: 2rem;
  text-align: center;
}

@media (min-width: 480px) {
  .xs\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
