/* ========================================
   v5 atoms — single-class primitives
   ----------------------------------------
   Building blocks shared across pages: scoreboard text, tags, chips,
   buttons, inputs, cards, referee-card glyphs, pitch-line decorations.
   The leading underscore makes this load first via Propshaft alphabetical
   ordering, so existing component CSS files (admin-table.css, salas.css)
   keep overriding for their scoped pages until those screens are migrated
   in Track E. New v5 pages just use these atoms directly.
   ======================================== */

/* ---- Type / scoreboard --------------- */
.scoreboard {
  font-family: var(--font-scoreboard);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.85;
}

.mono {
  font-family: var(--mono);
  letter-spacing: -0.01em;
}

.tag {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-3);
}

.micro {
  font-family: var(--font);
  font-size: 11px;
  color: var(--fg-3);
}

.muted { color: var(--fg-2); }
.dim   { color: var(--fg-3); }
.accent-text { color: var(--accent); }

/* ---- Lines / dividers ---------------- */
.hairline { border-top: 1px solid var(--line); }
.divider  { height: 1px; background: var(--line); }

/* ---- Cards --------------------------- */
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.card-flat {
  border: 1px solid var(--line);
  background: var(--card);
}

/* ---- Chips --------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 500;
  color: var(--fg-2);
  letter-spacing: 0.02em;
}
.chip.-active {
  background: var(--accent-dim);
  color: var(--accent);
  border-color: transparent;
}
.chip.-live {
  color: var(--roja);
  border-color: rgba(230, 57, 70, 0.35);
  font-weight: 600;
}
.chip.-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--roja);
  animation: v5-pulse 1.2s infinite;
}
@keyframes v5-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.35; transform: scale(0.85); }
}

/* ---- Buttons ------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--line-strong); }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}
.btn-primary:hover { background: #5fd48a; }

.btn-ghost {
  border: none;
  color: var(--fg-2);
  padding: 6px 10px;
}

/* ---- Forms --------------------------- */
.input {
  background: var(--input);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--fg);
  width: 100%;
  outline: none;
}
.input:focus { border-color: var(--accent); }
.input.-mono {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre;
  overflow-x: auto;
}

/* Quita los spinners (flechitas up/down) de los inputs type=number — el
   user los pidió globalmente. Si en algún caso se necesitan, sobreescribir
   con el modificador .input.-spinner. */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}
input[type="number"].-spinner {
  -moz-appearance: auto;
  appearance: auto;
}
input[type="number"].-spinner::-webkit-inner-spin-button,
input[type="number"].-spinner::-webkit-outer-spin-button {
  -webkit-appearance: auto;
  appearance: auto;
}

.label {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 500;
  color: var(--fg-2);
  margin-bottom: 6px;
  display: block;
  letter-spacing: 0.02em;
}

/* ---- Progress bar -------------------- */
.bar {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.bar > div {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
}

/* ---- Referee cards ------------------- */
.card-yellow,
.card-red {
  display: inline-block;
  width: 10px;
  height: 14px;
  border-radius: 1.5px;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}
.card-yellow { background: var(--amarilla); }
.card-red    { background: var(--roja); }
.card-yellow.-lg,
.card-red.-lg {
  width: 22px;
  height: 30px;
  border-radius: 2.5px;
}

/* ---- Pitch lines (decorative) -------- */
.cal-line { background: rgba(236, 232, 220, 0.55); }
.cal-dim  { background: rgba(236, 232, 220, 0.18); }

/* ---- LED dot (live indicators) ------- */
.led-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

/* ---- Ticking colon ------------------- */
@keyframes v5-tick {
  0%, 50%   { opacity: 1; }
  51%, 100% { opacity: 0.3; }
}
.tick { animation: v5-tick 1s infinite; }
