/* ============================================================
   tickets-light.css — Ticket CSS idéntico al diseño Gratis.png
   ============================================================ */

/* ── variables de tema ── */
.ticket-wrapper {
  --tc: #2e7d32;
  --tc-gradient: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
  --tc-divider-color: #5c6bc0;
  --tc-pill: #4a5568;
  width: 100%;
  max-width: 710px;
  margin: 0 auto;
}

/* ── Contenedor exterior con contorno degradado premium ── */
.ticket-outer {
  position: relative;
  padding: 12px;
  border-radius: 18px;
  background: var(--tc); /* Fallback de color sólido */
  background: var(--tc-gradient); /* Contorno degradado */
  box-shadow: 0 10px 28px rgba(0,0,0,0.15);
  display: flex;
  height: 264px;
}

/* Dientes en los laterales (triángulos perfectos vía SVG Data-URI) */
.ticket-outer::before,
.ticket-outer::after {
  content: '';
  position: absolute;
  top: 18px; bottom: 18px;
  width: 8px;
  z-index: 10;
  pointer-events: none;
  background-size: 8px 12px;
  background-repeat: repeat-y;
}
.ticket-outer::before {
  left: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 20'%3E%3Cpolygon points='0,0 10,10 0,20' fill='%23ffffff'/%3E%3C/svg%3E");
}
.ticket-outer::after {
  right: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 20'%3E%3Cpolygon points='10,0 0,10 10,20' fill='%23ffffff'/%3E%3C/svg%3E");
}

/* ── Ticket interior blanco ── */
.ticket-card {
  display: flex;
  width: 100%;
  height: 100%;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  font-family: 'Poppins', 'Arial Black', sans-serif;
}

/* ── SECCIÓN IZQUIERDA: cuerpo principal ── */
.tc-body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 16px 24px;
  margin: 4px 2px 4px 4px;
  border: 4px double var(--tc);
  border-radius: 8px;
  background: #fff;
  gap: 20px;
  position: relative;
  z-index: 2;
}

/* Columna Izquierda: Logo (Agrandado al Máximo) */
.tc-logo-col {
  width: 44%; /* Mayor espacio horizontal */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tc-logo-img {
  height: 150px; /* Agrandado sustancialmente */
  width: auto;
  object-fit: contain;
  display: block;
  max-width: 100%;
}

/* Columna Derecha: Información */
.tc-info-col {
  width: 56%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding-left: 15px;
}

.tc-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* "TICKET DE SORTEO" */
.tc-title {
  font-size: 2rem;
  font-weight: 900;
  color: var(--tc);
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

/* Píldora DIA DE SORTEO + fecha */
.tc-date-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--tc-pill);
  border-radius: 8px;
  padding: 5px 18px;
  gap: 1px;
  width: fit-content;
  min-width: 140px;
  color: #fff;
  margin-top: 4px;
}
.tc-date-label {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.tc-date-val {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* ── DIVISOR PERFORADO ── */
.tc-divider {
  width: 20px;
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}
.tc-dashes {
  width: 2px;
  height: calc(100% - 32px);
  background: repeating-linear-gradient(
    to bottom,
    var(--tc-divider-color) 0px,
    var(--tc-divider-color) 6px,
    transparent 6px,
    transparent 12px
  );
}
/* Tijeras */
.tc-scissor {
  position: absolute;
  font-size: 0.75rem;
  color: var(--tc-divider-color);
  line-height: 1;
  left: 50%;
  transform: translateX(-50%);
}
.tc-scissor-top { top: 14px; }
.tc-scissor-bot { bottom: 14px; transform: translateX(-50%) rotate(180deg); }

/* Círculos de corte */
.tc-hole {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tc);
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
}
.tc-hole-top { top: 2px; }
.tc-hole-bot { bottom: 2px; }

/* ── STUB DERECHO ── */
.tc-stub {
  width: 24%;
  min-width: 120px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px;
  margin: 4px 4px 4px 2px;
  border: 4px double var(--tc);
  border-radius: 8px;
  background: #fff;
  position: relative;
  z-index: 2;
}

/* Código vertical */
.tc-stub-code {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  font-family: 'Poppins', 'Arial Black', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  color: #111827;
  letter-spacing: 2px;
  white-space: nowrap;
  text-align: center;
}

/* Barcode CSS */
.tc-barcode {
  width: 32px;
  height: 110px;
  flex-shrink: 0;
  background: repeating-linear-gradient(
    90deg,
    #111 0px, #111 2px,
    transparent 2px, transparent 4px,
    #111 4px, #111 5px,
    transparent 5px, transparent 7px,
    #111 7px, #111 9px,
    transparent 9px, transparent 10px,
    #111 10px, #111 12px,
    transparent 12px, transparent 15px
  );
  opacity: 0.85;
}

/* PARTICIPANTE */
.tc-participante {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: #374151;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* ── Temas de color por tipo (Vivos y Degradados Premium) ── */
.ticket-gratis    { --tc: #15803d; --tc-gradient: linear-gradient(135deg, #22c55e 0%, #15803d 100%); --tc-divider-color: #22c55e; --tc-pill: #166534; }
.ticket-semanal   { --tc: #1f2937; --tc-gradient: linear-gradient(135deg, #9ca3af 0%, #4b5563 50%, #111827 100%); --tc-divider-color: #6b7280; --tc-pill: #374151; }
.ticket-quincenal { --tc: #0284c7; --tc-gradient: linear-gradient(135deg, #38bdf8 0%, #0284c7 50%, #1d4ed8 100%); --tc-divider-color: #0ea5e9; --tc-pill: #1e40af; }
.ticket-mensual   { --tc: #b45309; --tc-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%); --tc-divider-color: #d97706; --tc-pill: #78350f; }

/* ── Contenedor en página web ── */
.ticket-display-box {
  background: var(--bg-card, #f8fafc);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 24px;
  padding: 32px;
  margin: 0 auto;
  max-width: 820px;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .ticket-outer {
    padding: 6px;
    border-radius: 12px;
    height: 190px;
  }
  .tc-body {
    padding: 10px 12px;
    gap: 10px;
    margin: 4px 2px 4px 4px;
    border-width: 2px;
    border-radius: 6px;
  }
  .tc-logo-img {
    height: 80px;
  }
  .tc-title {
    font-size: 1.4rem;
  }
  .tc-date-pill {
    min-width: 110px;
    padding: 3px 10px;
  }
  .tc-date-val {
    font-size: 0.75rem;
  }
  .tc-stub {
    padding: 10px 6px;
    min-width: 85px;
    margin: 4px 4px 4px 2px;
    border-width: 2px;
    border-radius: 6px;
  }
  .tc-stub-code {
    font-size: 0.85rem;
  }
  .tc-barcode {
    width: 24px;
    height: 75px;
  }
  .tc-participante {
    font-size: 0.5rem;
  }
  .tc-hole {
    width: 12px;
    height: 12px;
  }
  .tc-hole-top { top: -1px; }
  .tc-hole-bot { bottom: -1px; }
}

@media (max-width: 480px) {
  .ticket-outer {
    height: 160px;
  }
  .tc-logo-img {
    height: 65px;
  }
  .tc-title {
    font-size: 1.15rem;
  }
  .tc-barcode {
    width: 20px;
    height: 60px;
  }
  .tc-stub-code {
    font-size: 0.7rem;
  }
}
