/* Module: events */
/* ============================================
   SINGLE EVENT – BEAT4PASS APP STYLE
   ============================================ */

/* --- Layout global sólo en single-eh_event --- */
body.single-eh_event {
  margin: 0;
  --eh-topbar-h: 0px;
  --eh-sidebar-top: 0px;
  background: #0a0e1a;
}

/* Ocultar topbar y header */
body.single-eh_event nav.eh-topbar,
body.single-eh_event #ehTopbar,
body.single-eh_event .wp-site-blocks > header.wp-block-template-part:first-child {
/*  display: none !important; */
}

/* Quitar padding/margen superior */
body.single-eh_event .wp-site-blocks,
body.single-eh_event .eh-main,
body.single-eh_event .eh-page,
body.single-eh_event .eh-layout {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Contenedor principal */
.eh-scope-single {
  background: #0a0e1a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  padding-bottom: 40px;
}

.eh-scope-single .container {
  max-width: 480px;
  padding: 0;
  margin: 0 auto;
}

/* ============================================
   HERO
   ============================================ */
.event-hero {
  position: relative;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px 20px 32px;
  background-size: cover !important;
  background-position: center !important;
  color: #fff;
  overflow: hidden;
}

/* Overlay oscuro con gradiente más dramático */
.event-hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 14, 26, 0.2) 0%,
    rgba(10, 14, 26, 0.5) 40%,
    rgba(10, 14, 26, 0.85) 70%,
    rgba(10, 14, 26, 0.98) 100%
  );
  z-index: 1;
}

/* Badges superiores - OCULTOS en esta versión */
.eh-hero__badges {
  display: none;
}

/* Contenido central del hero */
.eh-hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-top: auto;
  padding-bottom: 16px;
}

.eh-hero-title {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  color: #fff;
  text-shadow: 0 6px 30px rgba(0, 0, 0, 0.8);
}

.eh-hero-subtitle {
  font-size: 1.05rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  text-shadow: 0 3px 15px rgba(0, 0, 0, 0.5);
  line-height: 1.4;
}

/* CTA flotante - OCULTO en esta versión */
.eh-hero-cta {
  display: none;
}

/* ============================================
   CONTENIDO PRINCIPAL
   ============================================ */
.eh-event-content {
  background: #f8fafc;
  border-radius: 32px 32px 0 0;
  margin-top: -24px;
  position: relative;
  z-index: 3;
  padding: 24px 16px 140px;
  min-height: 400px;
}

/* Secciones */
.eh-section {
  margin-bottom: 32px;
}

.eh-section-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}

/* ============================================
   BADGES "SOBRE EL EVENTO" – CHIP DOBLE
   ============================================ */
.eh-section--about {
  position: relative;
  padding-top: 44px;
}

.eh-section--about .eh-section-title {
  margin-top: 32px;
}

.eh-section--about .eh-content-badges {
  position: absolute;
  top: -22px;
  left: 16px;
  right: 16px;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 4;
  overflow: hidden;
}

.eh-section--about .eh-content-badges .eh-badge {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.90rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 0;
  text-decoration: none;
  transition: all 0.2s ease;
  line-height: 1;
  overflow: hidden;
  white-space: nowrap;
}

.eh-section--about .eh-content-badges .eh-badge i {
  font-size: 11px;
  margin-right: 5px;
  flex-shrink: 0;
}

/* Badge de fecha: solo ocupa su tamaño natural */
.eh-section--about .eh-badge--when {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  color: #fff;
  flex: 0 0 auto;
}

/* Badge de venue: ocupa todo el espacio restante */
.eh-section--about .eh-badge--venue {
  background: #111827;
  color: #e5e7eb;
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 160px); /* 🔥 Deja espacio para el badge de fecha + gap */
  overflow: hidden;
}

/* Icono del venue no se encoge */
.eh-section--about .eh-badge--venue i {
  flex-shrink: 0;
  margin-right: 5px;
  width: 11px;
}

/* Texto del venue se trunca con ... */
.eh-section--about .eh-badge--venue .eh-badge__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Hover en badge clickeable */
.eh-section--about .eh-content-badges .eh-badge--clickable:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.5);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .eh-section--about .eh-content-badges {
    left: 14px;
    right: 14px;
    top: -20px;
    gap: 8px;
  }

  .eh-section--about .eh-content-badges .eh-badge {
    padding: 6px 12px;
    font-size: 0.74rem;
  }
  
  .eh-section--about .eh-badge--when {
    flex: 0 0 auto;
  }
  
  .eh-section--about .eh-badge--venue {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 140px); /* 🔥 Ajustado para móvil */
  }
}

/* ============================================
   DESCRIPCIÓN EXPANDIBLE
   ============================================ */
.eh-event-description__inner {
  font-size: 0.92rem;
  line-height: 1.65;
  color: #475569;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.eh-event-description__inner:not(.is-expanded) {
  max-height: 4.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  line-clamp: 3;
}

.eh-event-description__inner.is-expanded {
  max-height: none;
  display: block;
  -webkit-line-clamp: unset;
}

.eh-event-description__toggle {
  background: none;
  border: none;
  color: #6366f1;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 10px 0 0;
  margin-top: 8px;
  display: block;
  transition: color 0.2s ease;
}

.eh-event-description__toggle:hover {
  color: #4f46e5;
}

.eh-event-description__toggle.hidden {
  display: none !important;
}

/* ============================================
   TARJETAS DE TICKETS – 2 LÍNEAS COMPACTAS
   ============================================ */
.ticket-card {
  background: #fff;
  border-radius: 18px;
  margin-bottom: 14px;
  overflow: visible;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.1);
  transition: all 0.3s ease;
  padding: 16px 18px;
  border: 1px solid #e2e8f0;
}

.ticket-card:hover {
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.15);
  transform: translateY(-1px);
}

.ticket-card__header {
  padding: 0;
}

.ticket-card__info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Línea 1: Nombre y precio */
.ticket-card__row-1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.ticket-card__name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  line-height: 1.25;
  flex: 1;
}

.ticket-card__prices {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.ticket-price--old {
  font-size: 0.85rem;
  color: #94a3b8;
  text-decoration: line-through;
  font-weight: 500;
}

.ticket-price {
  font-size: 1.2rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

/* Línea 2: Descripción y controles */
.ticket-card__row-2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.ticket-card__desc {
  font-size: 0.82rem;
  color: #64748b;
  margin: 0;
  line-height: 1.45;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Controles de cantidad */
.ticket-controls {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-shrink: 0;
}

.btn-control {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.2);
}

.btn-control:hover {
  background: #1e293b;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
}

.btn-control:active {
  transform: scale(0.95);
}

.ticket-quantity {
  width: 46px;
  height: 36px;
  border-radius: 18px;
  border: 2px solid #cbd5e1;
  background: #fff;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  padding: 0;
  transition: border-color 0.2s ease;
}

.ticket-quantity:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.ticket-quantity::-webkit-outer-spin-button,
.ticket-quantity::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Detalles expandibles */
.ticket-card__details {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  margin-top: 0;
}

.ticket-card__details.is-open {
  max-height: 220px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
  margin-top: 12px;
}

.ticket-card__features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ticket-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 0.75rem;
  font-weight: 600;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.ticket-feature i {
  font-size: 13px;
  color: #64748b;
}

/* ============================================
   RESUMEN DEL CARRITO
   ============================================ */
.eh-cart-summary {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  margin: 28px 0 18px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  border: 2px solid #e2e8f0;
}

.eh-cart-summary.d-none {
  display: none !important;
}

.eh-cart-summary__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.eh-cart-summary__total {
  font-size: 2.2rem;
  font-weight: 900;
  color: #16a34a;
  line-height: 1;
  letter-spacing: -0.02em;
}

#eh-mini-cart-lines > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 0.88rem;
  border-bottom: 1px solid #f1f5f9;
}

#eh-mini-cart-lines > div:last-child {
  border-bottom: none;
}

#eh-mini-cart-lines .fw-semibold {
  flex: 1;
  color: #0f172a;
  font-weight: 600;
}

#eh-mini-cart-lines .text-muted {
  color: #64748b !important;
  margin-left: 6px;
  font-size: 0.82rem;
}

#eh-mini-cart-lines .text-nowrap {
  font-weight: 700;
  color: #475569;
}

#eh-mini-cart-clear {
  font-size: 0.82rem;
  color: #ef4444;
  font-weight: 700;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

#eh-mini-cart-clear:hover {
  color: #dc2626;
  text-decoration: underline;
}

.eh-cart-summary hr {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 14px 0;
}

/* ============================================
   BOTÓN SUBMIT
   ============================================ */
.btn-submit {
  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;
}

.btn-submit:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(99, 102, 241, 0.55);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.btn-submit:active {
  transform: translateY(-1px);
}

/* ============================================
   ALERTAS
   ============================================ */
.alert {
  border-radius: 18px;
  padding: 18px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.alert-warning {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  color: #92400e;
}

/* ============================================
   FOOTER COMPRA FLOTANTE
   ============================================ */
.eh-purchase-bar {
  position: fixed;
  bottom: 70px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 460px;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: 16px;
  padding: 10px 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  z-index: 999;
  transition: all 0.3s ease;
}

.eh-purchase-bar.d-none {
  transform: translate(-50%, 120px);
  opacity: 0;
  pointer-events: none;
}

.eh-purchase-bar__content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.eh-purchase-bar__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.eh-purchase-bar__info span:first-child {
  font-size: 0.72rem;
  opacity: 0.75;
  color: #cbd5e1;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.eh-purchase-bar__info span:last-child {
  font-size: 1.15rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.eh-purchase-bar__cta {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

.eh-purchase-bar__cta:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
}

.eh-purchase-bar__cta:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ============================================
   BOTTOM NAV
   ============================================ */
.eh-bottom-nav {
  z-index: 1000;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 54px;
  background: #0f172a;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.eh-event-content {
  padding-bottom: 140px;
}

body.eh-purchase-active {
  padding-bottom: 0 !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 480px) {
  .event-hero {
    min-height: 460px;
    padding: 20px 16px 28px;
  }

  .eh-hero-title {
    font-size: 2rem;
    margin-bottom: 10px;
  }

  .eh-hero-subtitle {
    font-size: 0.95rem;
  }

  .eh-section-title {
    font-size: 1.2rem;
  }

  .eh-section--about .eh-content-badges {
    left: 14px;
    right: 14px;
    top: -20px;
    gap: 8px;
  }

  .eh-section--about .eh-content-badges .eh-badge {
    padding: 6px 12px;
    font-size: 0.74rem;
  }

  .ticket-card {
    padding: 14px 16px;
  }

  .ticket-card__name {
    font-size: 1rem;
  }

  .ticket-price {
    font-size: 1.1rem;
  }

  .btn-control {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .ticket-quantity {
    width: 42px;
    height: 32px;
  }

  .eh-purchase-bar {
    width: calc(100% - 24px);
    padding: 9px 14px;
  }

  .eh-purchase-bar__cta {
    padding: 9px 20px;
    font-size: 0.85rem;
  }

  .eh-purchase-bar__info span:last-child {
    font-size: 1.05rem;
  }
}

@media (max-width: 360px) {
  .eh-purchase-bar {
    padding: 8px 12px;
  }

  .eh-purchase-bar__cta {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .eh-purchase-bar__info span:last-child {
    font-size: 1rem;
  }

  .eh-section--about .eh-content-badges .eh-badge {
    padding: 8px 11px;
    font-size: 0.7rem;
  }
}

@media (min-width: 768px) {
  .eh-scope-single .container {
    max-width: 560px;
  }

  .event-hero {
    min-height: 580px;
  }
}

/* Aplicar estilo al logo/nombre de la página dentro de la topbar de evento */
body.single-eh_event .eh-topbar-logo,
body.single-eh_event .eh-topbar-logo a {
    /* 1. Fuerza el color del texto a blanco (o gris muy claro) */
    color: #ffffff !important; 
    
    /* 2. Añade sombra negra al texto para mejorar la legibilidad sobre fondos variables */
    text-shadow: 
        1px 1px 2px #000000, 
        -1px -1px 2px #000000;
        
    /* Opcional: Puedes aumentar el tamaño de la fuente si lo deseas */
    /* font-size: 1.2rem; */ 
    /* font-weight: 800; */
}

/* Ocultar el formulario de búsqueda en la topbar de eventos */
body.single-eh_event .eh-topbar-search {
    display: none !important;
}


/* OPCIÓN 1: Franja diagonal con texto "AGOTADAS" */
.ticket-card--soldout {
  position: relative;
  opacity: 0.6;
  overflow: hidden; /* 🔥 Evita que la franja salga del contenedor */
}

.ticket-card--soldout::before {
  content: 'AGOTADAS';
  position: absolute;
  top: 50%;
  left: -10%; /* 🔥 Reducido para que no sobresalga tanto */
  right: -10%;
  background: linear-gradient(to right, 
    rgba(220, 38, 38, 0.9), 
    rgba(239, 68, 68, 0.9)
  );
  color: white;
  font-weight: bold;
  font-size: 16px; /* 🔥 Ligeramente más pequeño */
  padding: 6px 0;
  text-align: center;
  transform: translateY(-50%) rotate(-12deg); /* 🔥 Ángulo menos agresivo */
  letter-spacing: 3px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.103);
  z-index: 10;
  pointer-events: none; /* 🔥 No interfiere con clicks */
}



/* Opcional: Ocultar los badges/texto "Agotadas" que ya tienes en el template */
.ticket-card--soldout .ticket-badge--soldout,
.ticket-card--soldout .ticket-soldout-text
{
  display: none; /* Ya no necesitas estos porque el ::before/::after lo muestra mejor */
}

/* Opcional: Desactivar los controles de cantidad */
.ticket-card--soldout .ticket-controls
{
  opacity: 0.5;
  pointer-events: none;
}

/* Para mantener el precio visible pero atenuado */
.ticket-card--soldout .ticket-price
{
  opacity: 0.5;
}

.eh-ticket-fee-note{
  font-size: 11px;
  line-height: 1.3;
  margin-top: 4px;
  color: #6b7280; /* gris suave */
}

