/* Module: events */
/* ============================================
   CHECKOUT – BEAT4PASS APP STYLE
   ============================================ */

/* Layout global - mismo que single event */
body[class*="page"] main[data-page="checkout"] {
  background: #0a0e1a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  padding: 0 !important;
}

/* Contenedor principal */
body[class*="page"] main[data-page="checkout"] .container {
  max-width: 980px;
  padding: 0 16px 100px;
  margin: 0 auto;
}

/* ============================================
   WRAPPER DEL CONTENIDO
   ============================================ */
.eh-event-form {
  background: #f8fafc;
  border-radius: 32px 32px 0 0;
  padding: 32px 20px 40px;
  box-shadow: none;
  margin: 0 !important;
  max-width: 100% !important;
}

/* Títulos principales */
.eh-event-form h3 {
  font-size: 1.5rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  text-align: left;
}

.eh-event-form h3 i {
  color: #6366f1;
  margin-right: 8px;
}

.eh-event-form h4 {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 32px 0 18px;
  letter-spacing: -0.02em;
  text-align: left;
}

.eh-event-form h4 i {
  color: #6366f1;
  margin-right: 8px;
}

/* ============================================
   CAMPOS DE FORMULARIO
   ============================================ */
.eh-buyers-grid .form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 8px;
  display: block;
}

.eh-buyers-grid .form-label .text-danger {
  color: #ef4444;
}

.form-control,
.eh-buyers-grid .form-control {
  padding: 14px 18px;
  border-radius: 14px;
  border: 2px solid #e2e8f0;
  background: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  color: #0f172a;
  transition: all 0.2s ease;
  width: 100%;
}

.form-control:focus,
.eh-buyers-grid .form-control:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  background: #fff;
}

/* Campos pre-rellenados */
.form-control.is-prefilled {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  position: relative;
}

.form-control.is-prefilled:focus {
  background: #f8fafc !important;
  border-color: #6366f1 !important;
}

/* Eliminar estilos de los inputs redondeados (rounded-pill) */
.form-control.rounded-pill,
.eh-buyers-grid .form-control.rounded-pill {
  border-radius: 14px !important;
}

/* ============================================
   CAMPOS DE ASISTENTES
   ============================================ */
#asistentes-fields {
  margin-top: 0;
}

#asistentes-fields .form-control {
  margin-bottom: 12px;
}

/* ============================================
   MÉTODO DE PAGO - RADIO CARDS
   ============================================ */
.eh-radio-cards {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-top: 16px;
}

@media (min-width: 576px) {
  .eh-radio-cards {
    grid-template-columns: 1fr;
  }
}

.eh-radio-card {
  display: block;
  position: relative;
}

.eh-radio-card input {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.eh-radio-card__body {
  display: flex;
  flex-direction: column;
  border: 2px solid #e2e8f0;
  border-radius: 18px;
  padding: 18px 20px;
  transition: all 0.2s ease;
  background: #fff;
  cursor: pointer;
}

.eh-radio-card__body i {
  color: #6366f1;
  font-size: 1.1rem;
}

.eh-radio-card__title {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f172a;
  margin-top: 4px;
}

.eh-radio-card__desc {
  color: #64748b;
  font-size: 0.88rem;
  margin-top: 6px;
  line-height: 1.5;
}

.eh-radio-card:hover .eh-radio-card__body {
  border-color: #6366f1;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
  transform: translateY(-1px);
}

.eh-radio-card input:checked + .eh-radio-card__body {
  border-color: #6366f1;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05));
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

/* ============================================
   CHECKBOX TÉRMINOS
   ============================================ */
.form-check {
  padding-left: 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 24px;
}

.form-check-input {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-check-input:checked {
  background-color: #6366f1;
  border-color: #6366f1;
}

.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  border-color: #6366f1;
}

.form-check-label {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.5;
  cursor: pointer;
  flex: 1;
}

.form-check-label a {
  color: #6366f1;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.form-check-label a:hover {
  color: #4f46e5;
  text-decoration: underline;
}

/* ============================================
   BOTÓN SUBMIT
   ============================================ */
.btn-primary.eh-btn-submit,
.eh-event-form .btn-primary {
  width: 100%;
  padding: 18px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 12px 36px rgba(99, 102, 241, 0.45);
  transition: all 0.3s ease;
  margin-top: 28px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary.eh-btn-submit:hover,
.eh-event-form .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.btn-primary.eh-btn-submit:active,
.eh-event-form .btn-primary:active {
  transform: translateY(-1px);
}

.btn-primary.eh-btn-submit i {
  margin-right: 8px;
  font-size: 1.1rem;
}

/* Spinner del botón */
.eh-btn-spinner {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ehspin 0.8s linear infinite;
}

@keyframes ehspin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

.eh-btn-spinner.d-none {
  display: none !important;
}

/* ============================================
   RESUMEN (SIDEBAR)
   ============================================ */
.eh-card {
  background: #fff;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  border: 2px solid #e2e8f0;
  margin-bottom: 20px;
}

.eh-sticky {
  position: sticky;
  top: 20px;
}

.eh-mini__title {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.eh-mini__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.92rem;
  border-bottom: 1px solid #f1f5f9;
}

.eh-mini__row:last-child {
  border-bottom: none;
}

.eh-mini__row span:first-child {
  flex: 1;
  color: #475569;
  font-weight: 500;
}

.eh-mini__row span:last-child {
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
}

.eh-mini__row strong {
  font-weight: 700;
  color: #0f172a;
}

/* Fila de gastos */
.eh-mini__row--fee {
  font-size: 0.85rem;
}

.eh-mini__row--fee span {
  color: #64748b;
  font-weight: 500;
}

/* Total final */
.eh-mini__row:has(strong:first-child) {
  padding-top: 16px;
  margin-top: 8px;
  border-top: 2px solid #e2e8f0;
  font-size: 1.1rem;
}

/* Separador */
.eh-card hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 14px 0;
}

/* ============================================
   SWITCH "¿ERES SOCIO?"
   ============================================ */
.eh-socio-switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  padding: 16px;
  background: #f8fafc;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.eh-toggle-switch {
  display: flex;
  align-items: center;
  gap: 10px;
}

.eh-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.eh-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.eh-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  border-radius: 28px;
  border: 2px solid #e2e8f0;
  transition: 0.3s;
}

.eh-slider::before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: 0.3s;
}

.eh-socio-toggle:checked + .eh-slider {
  background-color: #16a34a;
  border-color: #16a34a;
}

.eh-socio-toggle:checked + .eh-slider::before {
  transform: translateX(22px);
}

.eh-no-socio-msg {
  color: #ef4444;
  font-style: normal;
  font-size: 0.85rem;
  margin: 12px 0;
  padding: 12px 16px;
  border-left: 3px solid #ef4444;
  background-color: #fef2f2;
  border-radius: 8px;
  line-height: 1.5;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
  body[class*="page"] main[data-page="checkout"] .container {
    padding: 0 14px 120px;
  }

  .eh-event-form {
    padding: 28px 16px 36px;
  }

  .eh-card {
    margin-bottom: 24px;
  }

  .eh-sticky {
    position: static;
  }
}

@media (max-width: 480px) {
  .eh-event-form h3 {
    font-size: 1.3rem;
  }

  .eh-event-form h4 {
    font-size: 1.2rem;
  }

  .form-control,
  .eh-buyers-grid .form-control {
    padding: 12px 16px;
    font-size: 0.9rem;
  }

  .eh-radio-card__body {
    padding: 16px 18px;
  }

  .btn-primary.eh-btn-submit,
  .eh-event-form .btn-primary {
    padding: 16px;
    font-size: 1rem;
  }

  .eh-card {
    padding: 20px;
  }

  .eh-mini__title {
    font-size: 1.2rem;
  }
}

/* ============================================
   OVERLAY DE REDIRECCIÓN
   ============================================ */
.eh-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(10, 14, 26, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
}

.eh-overlay.show {
  display: flex;
}

.eh-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: ehspin 1s linear infinite;
  margin-right: 16px;
}

/* ============================================
   AJUSTES FINALES
   ============================================ */

/* Quitar estilos conflictivos del theme */
body[class*="page"] main[data-page="checkout"] .entry-content {
  padding: 0 !important;
}



/* Ajustar espaciado de inputs en grids */
.eh-buyers-grid .row {
  margin: 0 -8px;
}

.eh-buyers-grid .row > [class*="col-"] {
  padding: 0 8px;
  margin-bottom: 16px;
}

:root {
    /* Variables de tu guía de estilo */
    --accent-primary: #6366f1;
    --border-medium: #cbd5e1;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --radius-md: 16px; /* Ajuste para inputs, 14px-18px */
}

/* Contenedor (opcional, para espaciado) */
.form-check-styled {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.92rem; /* Body Text */
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Ocultar el checkbox nativo */
.form-check-input {
    /* Estilos del checkbox nativo de tu HTML */
    appearance: none;
    -webkit-appearance: none;
    position: absolute; /* Para que no ocupe espacio y usemos el label */
    opacity: 0;
    width: 1px;
    height: 1px;
    overflow: hidden;
    margin: -1px;
    padding: 0;
}

/* Estilo del label y el custom checkbox */
.form-check-label {
    position: relative;
    padding-left: 28px; /* Espacio para el custom checkbox */
    cursor: pointer;
    font-weight: 500;
    user-select: none;
    transition: color 0.2s ease;
}

/* El custom checkbox (usando ::before) */
.form-check-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px; /* Alineación vertical */
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-medium);
    border-radius: 6px; /* Más pequeño y cuadrado que el radius-md */
    background-color: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

/* El ícono de check (usando ::after) */
.form-check-label::after {
    content: '\2713'; /* Unicode de marca de verificación */
    position: absolute;
    left: 4px;
    top: 2px; /* Ajuste fino para centrar el icono */
    width: 20px;
    height: 20px;
    color: white; /* Color del check */
    font-size: 16px;
    font-weight: 900;
    line-height: 18px; /* Ajuste fino */
    opacity: 0;
    transform: scale(0.5); /* Empieza pequeño */
    transition: all 0.2s ease;
}

/* ESTADO: Checked (el input real está :checked) */
.form-check-input:checked + .form-check-label::before {
    background-color: var(--accent-primary); /* Color de fondo púrpura */
    border-color: var(--accent-primary); /* Borde del mismo color */
}

.form-check-input:checked + .form-check-label::after {
    opacity: 1; /* Mostrar el check */
    transform: scale(1); /* Animación de escala */
}

/* ESTADO: Focus (Accesibilidad y estilo de inputs) */
.form-check-input:focus + .form-check-label::before {
    border-color: var(--accent-primary);
    /* Aplicar el focus box-shadow de tus inputs */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25); 
}

