/* ========================================
   Boletería primitives — building blocks shared across the app.
   These are intentionally generic (no page-specific selectors)
   so they can be composed in any view. Documented in
   docs/specs/boleteria-redesign.md (Phase 0).
   ======================================== */


/* ──────────────────────────────────────────
   .pill — scoreboard pill
   Used everywhere a status / count needs to surface: ribbon top
   bars, ticket headers, match cards. Variants change dot color
   and label tint without changing geometry.

   Markup:
     <span class="pill -live">
       <span class="dot"></span>
       <span class="label">LIVE</span>
       <span class="meta">3'</span>
     </span>
   ────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
  color: var(--ink-soft);
}
.pill > .dot {
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green-glow);
}
.pill > .label {
  /* Reset the global form-field .label (atoms.css) leaking display/
     margin/font-size into the pill. */
  display: inline;
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.pill > .meta {
  color: var(--ink);
  font-weight: 500;
}

.pill.-live > .dot {
  background: var(--coral);
  box-shadow: 0 0 10px var(--coral-glow);
  animation: pill-blink 1.4s ease-in-out infinite;
}
.pill.-live > .label { color: var(--coral); }

.pill.-gold > .dot {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}
.pill.-gold > .label { color: var(--gold); }

.pill.-info > .dot {
  background: var(--ink-soft);
  box-shadow: none;
}
.pill.-info > .label { color: var(--ink-soft); }

@keyframes pill-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .pill.-live > .dot { animation: none; }
}


/* ──────────────────────────────────────────
   .section-label — small mono caps with a
   dashed line trailing off to the right.
   Used as a visual heading for groupings of cards.

   Markup:
     <p class="section-label">— Entradas disponibles</p>
   ────────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--muted);
  text-transform: uppercase;
}
.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--dash-h);
}


/* ──────────────────────────────────────────
   .stamp — bordered mono caps badge.
   Used for "SERVICIO OPERATIVO" footer in the
   sidebar and for status seals on cards.

   Markup:
     <span class="stamp"><b>● Servicio operativo</b></span>
   ────────────────────────────────────────── */
.stamp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.stamp > b {
  color: var(--green);
  font-weight: 500;
}
.stamp.-gold > b   { color: var(--gold); }
.stamp.-coral > b  { color: var(--coral); }


/* ──────────────────────────────────────────
   .ribbon — top bar that sits above the page
   content. Holds a breadcrumb on the left and
   a row of pills on the right.

   Markup:
     <div class="ribbon">
       <span class="ribbon-crumb">› <b>Mundial 2026</b> · Fixture</span>
       <div class="ribbon-pills"><!-- pills --></div>
     </div>

   Mobile: crumb truncates with ellipsis, pills row scrolls
   horizontally if it overflows.
   ────────────────────────────────────────── */
.ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--line-strong);
}
.ribbon-crumb {
  flex: 1;
  min-width: 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ribbon-crumb > b {
  color: var(--ink);
  font-weight: 500;
}
.ribbon-crumb > a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: color 150ms, border-color 150ms;
}
.ribbon-crumb > a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}
.ribbon-pills {
  display: flex;
  gap: 10px;
  flex: 0 0 auto;
}

@media (max-width: 559px) {
  .ribbon {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .ribbon-pills {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ribbon-pills::-webkit-scrollbar { display: none; }
}


/* ──────────────────────────────────────────
   .dashed-divider — standalone horizontal
   dashed rule with consistent token-based pattern.

   Markup: <hr class="dashed-divider">
   ────────────────────────────────────────── */
.dashed-divider {
  border: 0;
  height: 1px;
  background: var(--dash-h);
  margin: 16px 0;
}


/* ──────────────────────────────────────────
   .wallet-page-head — shared header for the wallet flow pages
   (wallet show, deposits, payment methods). Same shape as the
   salas hero so the system reads as one.
   ────────────────────────────────────────── */
.wallet-page-head {
  margin-bottom: 24px;
}
.wallet-page-title {
  font-family: var(--font-scoreboard);
  font-size: clamp(40px, 8vw, 60px);
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 6px;
}
.wallet-page-title > .accent { color: var(--gold); }
.wallet-page-subtitle {
  color: var(--ink-soft);
  font-size: 14.5px;
  max-width: 540px;
  line-height: 1.5;
}


/* ──────────────────────────────────────────
   .boleteria-form-card + .boleteria-form
   Shared form treatment for in-app forms (Crear sala, edit profile,
   wallet flows, etc.). The card is a glass panel with a dashed
   eyebrow; inputs use mono labels and focus-glow rings.
   ────────────────────────────────────────── */
.boleteria-form-card {
  position: relative;
  max-width: 720px;
  padding: 28px 32px 26px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}
.boleteria-form-card__eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px dashed var(--line-strong);
}

.boleteria-form { display: flex; flex-direction: column; gap: 14px; }

.boleteria-form__field { display: flex; flex-direction: column; gap: 6px; }

.boleteria-form__label {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--muted);
}

.boleteria-form__input,
.boleteria-form__input:where(select) {
  width: 100%;
  padding: 11px 14px;
  background: var(--input);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  outline: none;
  transition: border-color 180ms, box-shadow 180ms, background 180ms;
}
.boleteria-form__input::placeholder { color: rgba(244, 235, 214, 0.32); }
.boleteria-form__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.14);
  background: rgba(255, 210, 63, 0.03);
}
.boleteria-form__input[type="text"]::placeholder,
.boleteria-form__input[type="email"]::placeholder,
.boleteria-form__input[type="password"]::placeholder { font-family: var(--font); }

/* Native select arrow indicator */
.boleteria-form__input:where(select) {
  appearance: none;
  -webkit-appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 16px, calc(100% - 13px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.boleteria-form__errors {
  background: rgba(255, 120, 102, 0.08);
  border: 1px solid rgba(255, 120, 102, 0.32);
  border-radius: 10px;
  padding: 10px 14px;
}
.boleteria-form__errors > .message {
  color: var(--coral);
  font-size: 13px;
  margin: 2px 0;
}

.boleteria-form__submit {
  margin-top: 6px;
  padding: 13px 18px;
  background: linear-gradient(135deg, var(--gold), #f0b820);
  color: var(--paper-ink);
  border: 0;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--gold-glow);
  transition: transform 150ms ease, box-shadow 200ms ease;
}
.boleteria-form__submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px var(--gold-glow);
}
.boleteria-form__submit:active { transform: translateY(0); }


/* Custom dropdown — auto-built by dropdown_controller.js when the form
   has data-controller="dropdown". Native <select> is hidden; this is
   what shows. Scoped to .boleteria-form so admin keeps its blue
   variant in admin-table.css. */
.boleteria-form .custom-dropdown {
  position: relative;
  width: 100%;
}
.boleteria-form .custom-dropdown-trigger {
  width: 100%;
  padding: 11px 36px 11px 14px;
  background: var(--input);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  text-align: left;
  cursor: pointer;
  transition: border-color 180ms, box-shadow 180ms;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2376887e' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.boleteria-form .custom-dropdown-trigger:hover,
.boleteria-form .custom-dropdown.-open .custom-dropdown-trigger {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.14);
  background-color: rgba(255, 210, 63, 0.03);
}
.boleteria-form .custom-dropdown-list {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  max-height: 260px;
  overflow-y: auto;
  padding: 5px;
}
.boleteria-form .custom-dropdown.-open .custom-dropdown-list { display: block; }
.boleteria-form .custom-dropdown-item {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 14px;
  cursor: pointer;
  transition: background 120ms, color 120ms;
}
.boleteria-form .custom-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}
.boleteria-form .custom-dropdown-item.-selected {
  background: rgba(255, 210, 63, 0.14);
  color: var(--gold);
  font-weight: 500;
}
.boleteria-form .custom-dropdown-item.-placeholder {
  color: var(--muted);
  font-style: italic;
}
.boleteria-form .custom-dropdown-list::-webkit-scrollbar { width: 4px; }
.boleteria-form .custom-dropdown-list::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 2px;
}


/* ──────────────────────────────────────────
   .confirm-modal — shared confirmation dialog.
   Rendered once at the layout level (shared/_confirm_modal).
   Trigger from any in-form button:
     data-action="click->confirm#show"
     data-confirm-message="…" / data-confirm-title="…" /
     data-confirm-confirm="…"  / data-confirm-danger="false"
   See controllers/confirm_controller.js for the full contract.
   ────────────────────────────────────────── */
.confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}
.confirm-modal.-open { display: flex; }

.confirm-modal > .dialog {
  width: 100%;
  max-width: 420px;
  padding: 24px 26px 20px;
  background: linear-gradient(180deg, var(--card), var(--card-2));
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.55);
}
.confirm-modal .dialog-eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.confirm-modal .dialog-title {
  font-family: var(--font-scoreboard);
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  color: var(--ink);
  margin-bottom: 10px;
}
.confirm-modal .dialog-message {
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.confirm-modal .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}
.confirm-modal .btn-ghost {
  padding: 9px 16px;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink-soft);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 150ms, color 150ms;
}
.confirm-modal .btn-ghost:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}
.confirm-modal .btn-confirm {
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--gold), #f0b820);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--paper-ink);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 18px var(--gold-glow);
  transition: transform 150ms, box-shadow 200ms;
}
.confirm-modal .btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px var(--gold-glow);
}
.confirm-modal .btn-confirm.-danger {
  background: linear-gradient(135deg, #ff7866, #d54f3a);
  color: #fff;
  box-shadow: 0 6px 18px var(--coral-glow);
}
.confirm-modal .btn-confirm.-danger:hover {
  box-shadow: 0 10px 24px var(--coral-glow);
}

/* ──────────────────────────────────────────
   .info-modal — reusable info dialog.
   Paper-toned card with eyebrow + scoreboard title + body sections.
   Triggered from any button inside the same [data-controller="info-modal"]
   scope. See shared/_info_modal partial and info_modal_controller.js.
   Variants:
     .info-modal__section — h3 (mono uppercase) + p, dashed top border
     .info-modal__step    — numbered step with circular badge
     .info-modal__fineprint — small footer note in amber-tinted box
   ────────────────────────────────────────── */
.info-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}
.info-modal.-open { display: flex; }

.info-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  padding: 28px 28px 24px;
  background: linear-gradient(180deg, var(--paper), var(--paper-2));
  color: var(--paper-ink);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  overflow-y: auto;
}

.info-modal__close {
  position: absolute;
  top: 14px; right: 14px;
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(26, 26, 21, 0.25);
  background: transparent;
  color: var(--paper-ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 150ms, color 150ms;
}
.info-modal__close:hover { border-color: var(--paper-ink); }

.info-modal__eyebrow {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(26, 26, 21, 0.55);
  margin-bottom: 10px;
}
.info-modal__title {
  color: var(--paper-ink);
  font-family: var(--font-scoreboard);
  font-size: 36px;
  font-weight: 400;
  letter-spacing: 0.03em;
  line-height: 1;
  margin: 0 0 18px;
}

/* Plain section: h3 (caption) + p */
.info-modal__section {
  padding: 14px 0;
  border-top: 1px dashed rgba(26, 26, 21, 0.25);
}
.info-modal__section:first-of-type { border-top: 0; padding-top: 0; }
.info-modal__section > h3 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(26, 26, 21, 0.65);
  margin: 0 0 4px;
}
.info-modal__section > p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--paper-ink);
  margin: 0;
}
.info-modal__section > p strong {
  font-weight: 700;
  color: var(--paper-ink);
}

/* Numbered step variant: circular badge + body */
.info-modal__steps {
  list-style: none;
  padding: 0;
  margin: 0;
}
.info-modal__step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-top: 1px dashed rgba(26, 26, 21, 0.25);
}
.info-modal__step:first-of-type { border-top: 0; padding-top: 4px; }
.info-modal__step > .step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(180, 83, 9, 0.18), rgba(180, 83, 9, 0.04));
  border: 1px solid rgba(180, 83, 9, 0.4);
  color: rgba(120, 53, 15, 0.95);
  font-family: var(--font-scoreboard);
  font-size: 14px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  margin-top: 2px;
}
.info-modal__step > .step-body { min-width: 0; }
.info-modal__step > .step-body > h3 {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  color: var(--paper-ink);
  margin: 0 0 2px;
  letter-spacing: 0.005em;
}
.info-modal__step > .step-body > p {
  font-size: 13px;
  line-height: 1.45;
  color: rgba(26, 26, 21, 0.78);
  margin: 0;
}
.info-modal__step > .step-body > p strong {
  color: rgba(120, 53, 15, 0.95);
  font-weight: 700;
}

/* Small footer note (amber-tinted) */
.info-modal__fineprint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 14px;
  padding: 8px 12px;
  background: rgba(180, 83, 9, 0.07);
  border: 1px dashed rgba(180, 83, 9, 0.3);
  border-radius: var(--radius);
  color: rgba(26, 26, 21, 0.78);
  font-size: 11.5px;
  line-height: 1.4;
}
.info-modal__fineprint > svg {
  color: rgba(120, 53, 15, 0.85);
  flex-shrink: 0;
  margin-top: 1px;
}
