/* ============================================
   TALLERES — sobre el sistema de diseño 2026
   Clases con prefijo `tl-` para no chocar con
   .hero/.badge/etc. ya usadas en style.css.
   ============================================ */

.talleres-page {
  --tl-purple: var(--azul-icesi);
  --tl-purple-dark: var(--azul-icesi-deep);
  --tl-purple-deep: #2c2c8f;
  --tl-yellow: var(--amarillo-icesi);
  --tl-orange: var(--naranja-icesi);
  --tl-ink: var(--negro);
  --tl-ink-soft: var(--gris-1);
  --tl-line: var(--gris-2);
  --tl-mute: var(--gris-2);
  --tl-bg: var(--blanco);
  --tl-bg-soft: var(--gris-suave);
  background: var(--tl-bg);
}

/* ---- Hero ---- */
.tl-hero {
  background: linear-gradient(120deg, var(--tl-purple-deep) 0%, var(--tl-purple) 55%, var(--tl-purple-dark) 100%);
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: clamp(48px, 7vw, 80px) 0;
}
.tl-hero__glow {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 235, 96, .25), transparent 70%);
  right: -160px;
  top: -220px;
  pointer-events: none;
}
.tl-hero__inner { position: relative; }
.tl-hero__title {
  font-size: var(--fs-3xl);
  font-weight: 800;
  line-height: 1.08;
  margin: 0 0 16px;
  max-width: 700px;
}
.tl-hero__title b { color: var(--tl-yellow); font-style: normal; }
.tl-hero__lead { font-size: var(--fs-lg); color: #eef0ff; max-width: 620px; line-height: 1.6; margin: 0 0 24px; }
.tl-hero__lead b { color: #fff; }

.tl-hero__status {
  margin-top: 6px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .2);
}
.tl-hero__status-text { font-size: var(--fs-sm); color: #eef0ff; line-height: 1.55; max-width: 560px; margin: 0 0 16px; }
.tl-hero__status-text strong { color: var(--tl-yellow); }

.tl-gate-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.tl-gate-btn {
  background: var(--tl-yellow); color: var(--tl-ink); font-weight: 700; font-size: var(--fs-sm);
  padding: 12px 24px; border: none; white-space: nowrap; text-decoration: none; display: inline-block;
}
.tl-gate-btn:hover { background: #d8e04a; }
.tl-gate-link {
  background: transparent; color: #fff; font-weight: 700; font-size: var(--fs-sm); padding: 11px 23px;
  border: 1px solid rgba(255, 255, 255, .65); text-decoration: none; white-space: nowrap; display: inline-block;
}
.tl-gate-link:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

/* ---- Reglas ---- */
.tl-rules { padding: 0 0 8px; }
.tl-rules-grid {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px;
  margin-top: -46px; position: relative; z-index: 2;
}
.tl-rule-card {
  background: var(--tl-bg); border: 1px solid var(--tl-line); box-shadow: 0 14px 30px -22px rgba(28, 28, 46, .3);
  padding: 22px 20px;
}
.tl-rule-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; background: var(--azul-icesi-soft); color: var(--tl-purple);
  font-weight: 800; font-size: var(--fs-sm); margin-bottom: 14px;
}
.tl-rule-card p { font-size: var(--fs-sm); line-height: 1.55; margin: 0; color: var(--tl-ink-soft); }
.tl-rule-card p b { color: var(--tl-ink); }

/* ---- Filtros ---- */
.tl-filters { padding: 36px 0 8px; }
.tl-fgroup { margin-bottom: 18px; }
.tl-flabel { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--tl-ink-soft); margin-bottom: 10px; }
.tl-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.tl-chip {
  background: var(--tl-bg); border: 1px solid var(--tl-line); color: var(--tl-ink-soft); font-size: var(--fs-sm);
  font-weight: 600; padding: 10px 18px; transition: .15s;
}
.tl-chip.is-active { background: var(--tl-purple); border-color: var(--tl-purple); color: #fff; }
.tl-chip:hover:not(.is-active) { border-color: var(--tl-purple); color: var(--tl-purple); }
.tl-count { font-size: var(--fs-sm); color: var(--tl-ink-soft); margin: 14px 0 4px; }
.tl-count b { color: var(--tl-ink); }

/* ---- Tickets ---- */
.tl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 16px 0 60px; }
.tl-ticket {
  position: relative; border: 1px solid var(--tl-line); background: var(--tl-bg);
  display: grid; grid-template-columns: 1fr 128px;
  box-shadow: 0 16px 34px -26px rgba(22, 22, 37, .35);
  transition: transform .18s ease, box-shadow .18s ease;
}
.tl-ticket:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -22px rgba(22, 22, 37, .4); }
.tl-ticket.is-hidden { display: none; }
.tl-ticket.is-selected { border-color: var(--tl-purple); box-shadow: 0 20px 44px -22px rgba(84, 84, 233, .45); }
.tl-ticket-stripe { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--tl-orange); }
.tl-ticket.presencial .tl-ticket-stripe { background: var(--tl-purple); }
.tl-ticket.agotado .tl-ticket-stripe { background: var(--tl-mute); }
.tl-ticket.agotado:hover { transform: none; }

.tl-ticket-body { padding: 22px 26px 22px 30px; }
.tl-presenter-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.tl-tallerista-photo {
  flex: none; width: 56px; height: 56px; border-radius: 50%; overflow: hidden;
  background: var(--azul-icesi-soft); border: 1px solid var(--tl-line);
  display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--tl-mute);
}
.tl-tallerista-photo img { width: 100%; height: 100%; object-fit: cover; }
.tl-ticket.agotado .tl-tallerista-photo img { filter: grayscale(1); opacity: .7; }
.tl-presenter { font-size: 13.5px; color: var(--tl-ink-soft); margin: 0 0 3px; font-weight: 600; }
.tl-country { font-size: 11.5px; color: var(--tl-ink-soft); margin: 0; letter-spacing: .02em; }
.tl-ttitle { font-size: var(--fs-lg); font-weight: 800; line-height: 1.3; margin: 0 0 10px; }
.tl-ticket.agotado .tl-ttitle { color: var(--tl-ink-soft); }

.tl-avail { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13.5px; }
.tl-avail-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; }
.tl-avail-text { color: var(--tl-ink); font-weight: 600; }
.tl-avail-text b { font-weight: 800; }
.tl-avail-total { color: var(--tl-ink-soft); font-size: 12.5px; }
.tl-avail-ok .tl-avail-dot { background: var(--verde-icesi); }
.tl-avail-ok .tl-avail-text b { color: var(--verde-icesi); }
.tl-avail-low .tl-avail-dot { background: var(--tl-orange); }
.tl-avail-low .tl-avail-text { color: var(--tl-orange); }
.tl-avail-none .tl-avail-dot { background: var(--tl-ink-soft); }
.tl-avail-none .tl-avail-text { color: var(--tl-ink-soft); font-weight: 700; }
.tl-cap-bar { height: 5px; background: #ececf4; margin: 0 0 15px; overflow: hidden; }
.tl-cap-bar span { display: block; height: 100%; background: var(--tl-purple); }
.tl-avail-ok ~ .tl-cap-bar span { background: var(--verde-icesi); }
.tl-avail-low ~ .tl-cap-bar span { background: var(--tl-orange); }
.tl-avail-none ~ .tl-cap-bar span { background: var(--tl-mute); }

.tl-desc { font-size: 14.5px; color: var(--tl-ink-soft); line-height: 1.6; margin: 0 0 14px; }
.tl-desc.clamped { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.tl-meta-toggle { background: none; border: none; color: var(--tl-purple); font-weight: 700; font-size: 13.5px; padding: 0; margin-bottom: 14px; text-decoration: underline; }
.tl-meta { display: none; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; background: var(--tl-bg-soft); border: 1px solid var(--tl-line); padding: 18px 20px; margin-bottom: 4px; }
.tl-meta.is-open { display: grid; }
.tl-meta dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--tl-ink-soft); font-weight: 700; margin: 0 0 2px; }
.tl-meta dd { font-size: 13.5px; margin: 0 0 10px; color: var(--tl-ink); }

.tl-ticket-stub {
  position: relative; border-left: 2px dashed var(--tl-line);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: 22px 12px; text-align: center; gap: 10px; background: var(--tl-bg-soft);
}
.tl-ticket-stub::before, .tl-ticket-stub::after {
  content: ""; position: absolute; left: -9px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--tl-bg); border: 1px solid var(--tl-line);
}
.tl-ticket-stub::before { top: -9px; }
.tl-ticket-stub::after { bottom: -9px; }
.tl-stub-badges { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.tl-badge { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 5px 6px; border: 1px solid var(--tl-purple); color: var(--tl-purple); background: var(--tl-bg); }
.tl-badge.virtual { border-color: var(--tl-orange); color: var(--tl-orange); }
.tl-badge.presencial { border-color: var(--tl-purple); color: var(--tl-purple); }
.tl-ticket.agotado .tl-badge { border-color: var(--tl-mute); color: var(--tl-ink-soft); }
.tl-waitlist-note { font-size: 11.5px; color: var(--tl-ink-soft); line-height: 1.4; }

.tl-select-wrap { width: 100%; }
.tl-select-wrap input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tl-select-label {
  display: block; width: 100%; background: var(--tl-purple); color: #fff; font-weight: 800; font-size: 12.5px;
  padding: 10px 6px; border: 1px solid var(--tl-purple); text-align: center; line-height: 1.3; cursor: pointer;
}
.tl-select-label:hover { background: var(--tl-purple-dark); }
.tl-select-wrap input[type="radio"]:checked + .tl-select-label { background: var(--tl-yellow); color: var(--tl-ink); border-color: var(--tl-yellow); }
.tl-select-wrap input[type="radio"]:disabled + .tl-select-label { background: #e4e4ee; color: var(--tl-ink-soft); border-color: #e4e4ee; cursor: not-allowed; }
.tl-select-wrap input[type="radio"]:focus-visible + .tl-select-label { outline: 2px solid var(--tl-purple); outline-offset: 2px; }

.tl-empty-state { text-align: center; padding: 60px 20px; color: var(--tl-ink-soft); border: 1px dashed var(--tl-line); }

/* ---- Barra de selección, fija al fondo ---- */
.tl-selection-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; background: var(--tl-ink); color: #fff;
  transform: translateY(100%); transition: transform .25s ease;
  padding: 16px 0; border-top: 3px solid var(--tl-yellow);
  box-shadow: 0 -14px 26px -18px rgba(0, 0, 0, .4);
}
.tl-selection-bar.show { transform: translateY(0); }
.tl-sb-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tl-sb-label { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: #a8a8c4; margin: 0 0 3px; }
.tl-sb-title { font-size: 15px; font-weight: 800; margin: 0; }
.tl-sb-actions { display: flex; gap: 10px; }
.tl-sb-btn { padding: 11px 20px; font-weight: 700; font-size: 13.5px; border: none; }
.tl-sb-clear { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .35) !important; }
.tl-sb-confirm { background: var(--tl-yellow); color: var(--tl-ink); }
.tl-sb-confirm:disabled { opacity: .6; cursor: not-allowed; }

@media (max-width: 900px) {
  .tl-grid { grid-template-columns: 1fr; }
  .tl-rules-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
  .tl-rules-grid { grid-template-columns: repeat(2, 1fr); margin-top: -30px; }
  .tl-ticket { grid-template-columns: 1fr; }
  .tl-ticket-stub { flex-direction: row; border-left: none; border-top: 2px dashed var(--tl-line); align-items: center; }
  .tl-ticket-stub::before, .tl-ticket-stub::after { top: -9px; bottom: auto; }
  .tl-ticket-stub::before { left: -9px; }
  .tl-ticket-stub::after { left: auto; right: -9px; }
  .tl-stub-badges { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; width: auto; }
  .tl-select-wrap { width: auto; margin-left: auto; }
  .tl-select-label { padding: 10px 20px; }
  .tl-meta { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .tl-rules-grid { grid-template-columns: 1fr; margin-top: -24px; }
  .tl-filters { padding: 28px 0 4px; }
  .tl-chips { gap: 8px; }
  .tl-chip { font-size: 13px; padding: 9px 14px; }
  .tl-grid { gap: 16px; padding: 14px 0 40px; }
  .tl-ticket-body { padding: 20px 20px 18px; }
  .tl-ticket-stripe { width: 5px; }
  .tl-ttitle { font-size: 17.5px; }
  .tl-ticket-stub { flex-wrap: wrap; padding: 16px 16px 18px; gap: 12px; }
  .tl-select-wrap { width: 100%; margin-left: 0; }
  .tl-select-label { width: 100%; }
  .tl-gate-actions { width: 100%; }
  .tl-gate-btn, .tl-gate-link { flex: 1; text-align: center; }
  .tl-sb-inner { flex-direction: column; align-items: stretch; gap: 12px; }
  .tl-sb-actions { width: 100%; }
  .tl-sb-btn { flex: 1; }
}
