/* Reusable pieces from the mockup: badges, pills, eyebrows, buttons, fields,
 * odds chips, bet slip, event rows, overlays. Every number is a fig-spec value;
 * states the mockup does not draw (hover, focus, active, disabled, error) are
 * derived in its own logic — brand one step darker, underline, ring. */

/* ── badges & pills ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-6);
  padding: 2px 8px; border-radius: var(--radius-xs);
  font-family: var(--font-mono); font-weight: 700; font-size: 10px; line-height: 13px;
  white-space: nowrap;
}
.badge--18 { background: var(--color-danger-bg); color: var(--color-danger-2); box-shadow: inset 0 0 0 1px var(--color-danger-line); }
.badge--18-lg { padding: 4px 10px; font-size: 11px; line-height: 12px; }
.badge--debit {
  padding: 4px 10px; background: var(--color-danger-bg-2); color: var(--color-danger-2);
  box-shadow: inset 0 0 0 1px var(--color-danger-line-2);
  font-family: var(--font-display); font-weight: 900; font-size: 9px; line-height: 11px;
}
.badge--brand { background: var(--color-brand); color: var(--color-text); font-family: var(--font-body); font-weight: 800; font-size: 10px; line-height: 11px; border-radius: var(--radius-pill); padding: 4px 10px; text-transform: uppercase; }
.badge--outline { background: transparent; color: var(--color-muted); box-shadow: inset 0 0 0 1px var(--color-line-dark-2); font-family: var(--font-body); font-weight: 700; font-size: 10px; line-height: 11px; border-radius: var(--radius-pill); padding: 4px 10px; text-transform: uppercase; }

.pill {
  display: inline-flex; align-items: center; gap: var(--space-6);
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-line-dark);
  font-size: 11px; line-height: 12px; color: var(--color-text); text-decoration: none;
  transition: background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.pill:hover { background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--color-line-dark-2); }
.pill__label { font-weight: 600; }
.pill--betstop .pill__label { font-weight: 700; }
.pill__value { font-family: var(--font-mono); font-weight: 700; line-height: 14px; color: var(--color-brand-2); }
.pill__muted { color: var(--color-muted); }

/* ── eyebrow ──────────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--space-8);
  font-family: var(--font-mono); font-weight: 800; font-size: 11px; line-height: 14px;
  letter-spacing: 1.5px; color: var(--color-brand);
}
.eyebrow--dash::before { content: ""; width: 24px; height: 1px; background: currentColor; }
.eyebrow--stone { font-family: var(--font-display); font-weight: 900; font-size: 12px; line-height: 15px; letter-spacing: 1.5px; color: var(--color-brand-ink); }
.eyebrow--muted { color: var(--color-muted); }

/* ── buttons ──────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8);
  min-height: 50px; padding: 0 var(--space-24);
  border: 0; border-radius: var(--radius-10);
  background: transparent; color: inherit;
  font-family: var(--font-body); font-weight: 800; font-size: 15px; line-height: 16px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              box-shadow var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn--primary { background: var(--color-brand); color: var(--color-text); }
.btn--primary:hover { background: var(--color-brand-hover); }
.btn--primary:active { background: var(--color-brand-active); }
.btn--primary:focus-visible { box-shadow: 0 0 0 3px var(--color-bg), var(--focus-ring); }

.btn--dark { background: var(--color-ink); color: var(--color-light-3); font-weight: 800; }
.btn--dark:hover { background: #2a2a35; }

.btn--outline { box-shadow: inset 0 0 0 1px var(--color-line-dark-2); color: var(--color-text); }
.btn--outline:hover { background: var(--color-surface-2); }

.btn--ghost { color: var(--color-text); }
.btn--ghost:hover { color: var(--color-brand); }

.btn--sm { min-height: 35px; padding: 10px 20px; border-radius: var(--radius-md); font-size: 14px; }
.btn--xs { min-height: 34px; padding: 10px 20px; border-radius: var(--radius-sm); font-size: 13px; line-height: 14px; font-weight: 700; }
.btn--block { width: 100%; }

/* text links with an arrow, drawn everywhere as "Label →" */
.arrow-link {
  display: inline-block; position: relative;
  font-weight: 700; font-size: 14px; line-height: 15px;
  color: var(--color-brand); text-decoration: none;
  transition: color var(--dur-fast) var(--ease);
}
.arrow-link:hover { text-decoration: underline; }
.arrow-link--light { color: var(--color-text); }
.arrow-link--ink { color: var(--color-brand-ink); }
.arrow-link--sm { font-size: 13px; line-height: 14px; }
.arrow-link--xs { font-size: 12px; line-height: 13px; }

/* ── fields ───────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: var(--space-8); }
.field__label {
  font-family: var(--font-body); font-weight: 800; font-size: 11px; line-height: 12px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--color-muted-light);
}
.field__control { position: relative; }
.field input:not(.visually-hidden):not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 0 var(--space-16);
  border: 1px solid var(--color-line-light); border-radius: var(--radius-10);
  background: #fff; color: var(--color-ink);
  font-size: 15px; line-height: 16px;
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: #9ca3af; opacity: 1; }
.field textarea { min-height: 140px; padding-block: var(--space-12); resize: vertical; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M4 6l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px; padding-right: 40px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--color-brand); box-shadow: var(--focus-ring); outline: none; }
.field__hint { font-size: 12px; line-height: 13px; color: var(--color-muted-light); }
.field__error { font-size: 12px; line-height: 13px; color: var(--color-danger-3); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--color-danger-3); }
.field__toggle {
  position: absolute; right: 14px; top: 50%; translate: 0 -50%;
  padding: 4px; border: 0; background: none; cursor: pointer;
  font-size: 12px; font-weight: 700; color: var(--color-brand-ink);
}
.field__toggle:hover { text-decoration: underline; }

.field--check { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: var(--space-12); }
.field--check .field__label { font-family: var(--font-body); font-weight: 400; font-size: 13px; line-height: 18px; letter-spacing: 0; text-transform: none; color: var(--color-text-dark); }
.field--check .field__label a { color: var(--color-brand-ink); }
.field--check input[type="checkbox"] {
  appearance: none; width: 18px; height: 18px; margin-top: 1px;
  border: 1px solid var(--color-line-light); border-radius: var(--radius-xs); background: #fff;
  display: grid; place-items: center; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.field--check input[type="checkbox"]:checked { background: var(--color-brand); border-color: var(--color-brand); }
.field--check input[type="checkbox"]:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; rotate: -45deg; translate: 0 -1px; }
.field--check input[type="checkbox"]:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.field--check .field__error { grid-column: 1 / -1; }

.form__error, .form__success { font-size: 13px; line-height: 18px; }
.form__error { color: var(--color-danger-3); }
.form__success { color: var(--color-success); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-16); }

/* ── segmented tabs (workspace filters) ───────────────────────────────── */
.tabs { display: flex; gap: var(--space-32); box-shadow: inset 0 -1px 0 var(--color-line-dark); }
.tabs__tab {
  position: relative; padding: 0 0 12px; border: 0; background: none; cursor: pointer;
  font-size: 14px; line-height: 15px; font-weight: 500; color: var(--color-muted);
  transition: color var(--dur-fast) var(--ease);
}
.tabs__tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--color-brand); transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-base) var(--ease);
}
.tabs__tab:hover { color: var(--color-text); }
.tabs__tab[aria-selected="true"] { color: var(--color-text); font-weight: 700; }
.tabs__tab[aria-selected="true"]::after { transform: scaleX(1); }

/* ── odds chip ────────────────────────────────────────────────────────── */
.odd {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 68px; height: 44px; padding: 0 var(--space-12);
  border: 0; border-radius: var(--radius-sm);
  background: var(--color-ink); box-shadow: inset 0 0 0 1px var(--color-line-dark);
  color: var(--color-text); cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.odd__name { font-size: 10px; line-height: 11px; font-weight: 600; color: var(--color-muted); transition: color var(--dur-fast) var(--ease); }
.odd__price { font-family: var(--font-mono); font-weight: 700; font-size: 11px; line-height: 14px; }
.odd:hover { background: var(--color-surface-2); box-shadow: inset 0 0 0 1px var(--color-brand); }
.odd:active { transform: scale(.98); }
.odd.is-selected, .odd[aria-pressed="true"] { background: var(--color-brand); box-shadow: none; }
.odd.is-selected .odd__name, .odd[aria-pressed="true"] .odd__name { color: var(--color-text); }
.odd:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* ── overlays (modal, mobile menu, gates) ─────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  display: grid; place-items: center;
  padding: var(--space-16);
  background: var(--color-scrim);
  opacity: 0;
  transition: opacity var(--dur-slow) var(--ease);
  overflow-y: auto;
}
.overlay.is-open { opacity: 1; }
.overlay__panel {
  width: min(100%, 460px);
  background: var(--color-light); color: var(--color-ink);
  border-radius: var(--radius-2xl);
  padding: 36px 40px 32px;
  transform: translateY(8px);
  transition: transform var(--dur-slow) var(--ease);
  box-shadow: var(--shadow-modal);
}
.overlay.is-open .overlay__panel { transform: none; }
.overlay__close {
  position: absolute; top: 20px; right: 20px;
  width: 24px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--color-muted-light); transition: color var(--dur-fast) var(--ease);
}
.overlay__close::after { content: ""; position: absolute; inset: -10px; }
.overlay__close:hover { color: var(--color-ink); }
.overlay__close .icon { width: 24px; height: 24px; }

/* Icons inherit colour and take their size from CSS. */
.icon { width: 1em; height: 1em; fill: none; }
.icon--missing { display: inline-block; width: 1em; height: 1em; outline: 1px dashed var(--color-error); }
.img-missing { display: block; width: 100%; aspect-ratio: 16 / 9; background: var(--color-surface-2); outline: 1px dashed var(--color-error); }

@media (max-width: 1199px) {
  .form__row { grid-template-columns: 1fr; }
  .overlay { padding: var(--space-16); }
  .overlay__panel { padding: 28px 20px 24px; }
}
