/* ============================================================
   scoring.css — LeagueHub scorekeeper UI
   Bootstrap 5.1.3 compatible — no 5.3+ utilities
   ============================================================ */

/* ── Scoring container ────────────────────────────────────── */
.scoring-container {
  max-width: 600px;
  margin: 0 auto;
}

/* Scorekeeper headings use the display font (#130). */
.scoring-container h1,
.scoring-container h2,
.scoring-container h3,
.scoring-container h4,
.scoring-container h5,
.scoring-container h6 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.25;
}

.scoring-score {
  font-size: 3rem;
  font-weight: bold;
  line-height: 1;
}

.scoring-team {
  font-size: 1.2rem;
  text-transform: uppercase;
  font-weight: 600;
}

/* .scoring-btn kept as alias — GameSelect still references it */
.scoring-btn {
  min-height: 48px;
  font-size: 16px;
  line-height: 1.25;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

@media (max-width: 375px) {
  .scoring-score { font-size: 2.2rem; }
  .scoring-team { font-size: 1rem; }
}

/* ── Touch target utility ─────────────────────────────────── */
.btn-touch {
  min-width: 48px;
  min-height: 48px;
  font-size: 16px;    /* prevents iOS zoom on focus */
  line-height: 1.25;
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

/* ── Period selector ──────────────────────────────────────── */
.period-selector-wrap {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.period-selector-wrap::-webkit-scrollbar { display: none; }

.period-pill {
  flex-shrink: 0;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--bs-gray-300);
  background: var(--white);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 48px;
  min-width: 48px;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.period-pill:focus-visible {
  outline: 3px solid var(--league-primary, var(--navy));
  outline-offset: 2px;
}
.period-pill--active {
  background-color: var(--league-primary, var(--navy));
  color: var(--white);
  border-color: var(--league-primary, var(--navy));
}

/* ── Shot tracker cards ───────────────────────────────────── */
.shot-card {
  background: var(--bs-gray-100);
  border: 1px solid var(--bs-gray-300);
  border-radius: 0.5rem;
  padding: 0.75rem 0.5rem;
  text-align: center;
}
.shot-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--bs-gray-700);
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  margin-bottom: 0.15rem;
}
.shot-card__period-label {
  font-size: 0.7rem;
  color: var(--bs-gray-600);
  margin-bottom: 0.4rem;
}
.shot-card__controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.shot-card__count {
  font-size: 1.75rem;
  font-weight: 700;
  min-width: 2.5rem;
  display: inline-block;
  text-align: center;
  line-height: 1;
}

/* ── Goal type pills ──────────────────────────────────────── */
.goal-type-pill {
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.875rem;
}
.goal-type-pill--active {
  background-color: var(--league-primary, var(--navy));
  color: var(--white);
  border-color: var(--league-primary, var(--navy));
}

/* ── Bottom sheet ─────────────────────────────────────────── */
.bottom-sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1040;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}
.bottom-sheet-backdrop--visible {
  opacity: 1;
  pointer-events: auto;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1050;
  background: var(--white);
  border-radius: 1rem 1rem 0 0;
  max-height: 75vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 200ms ease-out;
  box-shadow: 0 -2px 8px var(--shadow-color);
}
.bottom-sheet--open {
  transform: translateY(0);
}
.bottom-sheet__handle {
  width: 40px;
  height: 4px;
  background: var(--bs-gray-300);
  border-radius: 2px;
  margin: 0.75rem auto 0;
}
.bottom-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.5rem;
  border-bottom: 1px solid var(--bs-gray-300);
}
.bottom-sheet__body {
  padding: 1rem;
}

/* ── Hold-to-confirm ring ─────────────────────────────────── */
.mark-final-btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.mark-final-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(rgba(255,255,255,0.35) 0%, transparent 0%);
  opacity: 0;
  transition: none;
}
.mark-final-btn--holding::after {
  opacity: 1;
  animation: mark-final-fill 2000ms linear forwards;
}
@keyframes mark-final-fill {
  from { background: conic-gradient(rgba(255,255,255,0.35) 0%, transparent 0%); }
  to   { background: conic-gradient(rgba(255,255,255,0.35) 360deg, transparent 360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .mark-final-btn--holding::after { animation: none; opacity: 0; }
  .bottom-sheet { transition: none; }
  .bottom-sheet-backdrop { transition: none; }
  .period-pill { transition: none; }
}

/* ── LiveBadge ────────────────────────────────────────────── */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background-color: var(--danger, var(--danger));
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 50px;
}
.live-badge__dot {
  width: 7px;
  height: 7px;
  background: var(--white);
  border-radius: 50%;
  animation: live-pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .live-badge__dot { animation: none; }
}

/* ── Focus ring — all interactive elements ────────────────── */
:is(.btn-touch, .period-pill, .goal-type-pill, .bottom-sheet button):focus-visible {
  outline: 3px solid var(--league-primary, var(--navy));
  outline-offset: 2px;
}

/* ── Goal modal — jersey status slot (F1, F3, F7) ────────── */
.jersey-status {
  min-height: 1.4rem; /* reserve space — prevents layout shift */
  line-height: 1;
}

/* ── Goal modal — jersey column touch-height context (F2) ── */
.jersey-col .form-control {
  min-height: 48px; /* WCAG touch target — overrides Bootstrap default ~38px */
}

@media (max-width: 767.98px) {
  .jersey-col .jersey-entry__input {
    width: 6rem; /* wider input on phone where full column is available */
  }
}

/* ── Goal modal — goalie context line fixed height (F5) ───── */
.goal-context-line {
  min-height: 1.5rem;
}

/* ── Bottom sheet — scroll-shadow affordance (F10) ────────── */
.bottom-sheet__body {
  /* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- multi-layer gradient shorthand; positional "0" is idiomatic and not a color value. */
  background:
    linear-gradient(var(--white) 30%, rgba(255,255,255,0)),
    linear-gradient(rgba(255,255,255,0), var(--white) 70%) 0 100%,
    radial-gradient(farthest-side at 50% 0, rgba(0,0,0,0.12), transparent),
    radial-gradient(farthest-side at 50% 100%, rgba(0,0,0,0.12), transparent) 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 40px, 100% 40px, 100% 14px, 100% 14px;
  background-attachment: local, local, scroll, scroll;
}

/* ── Status transition bar ────────────────────────────────── */
.scoring-transition-bar {
  min-height: 48px;
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

/* ── 4-box action grid ────────────────────────────────────── */
.scoring-action-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  border-radius: 8px;
  padding: 8px 6px;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.1s ease, transform 0.1s ease;
}
.scoring-action-box:active {
  transform: scale(0.97);
}
.scoring-action-box--active {
  background-color: var(--navy);
  color: var(--white);
}
.scoring-action-box--active:hover {
  filter: brightness(0.93);
}
.scoring-action-box--disabled {
  background-color: var(--bs-gray-200);
  color: var(--bs-gray-500);
  cursor: not-allowed;
}
.scoring-action-box:focus-visible {
  outline: 3px solid var(--league-primary, var(--navy));
  outline-offset: 2px;
}
.scoring-action-box__icon {
  font-size: 16px;
  line-height: 1;
}
.scoring-action-box__team {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  max-width: 100%;
}
.scoring-action-box__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── Shots chip row ───────────────────────────────────────── */
.shots-chip-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.shots-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bs-gray-100);
  border: 1px solid var(--bs-gray-300);
  border-radius: 50px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
}
.shots-chip__team {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--bs-gray-700);
}
.shots-chip__value {
  font-weight: 600;
  color: var(--bs-gray-900);
}
.shots-chip-separator {
  color: var(--bs-gray-500);
  font-size: 0.9rem;
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .scoring-action-box { transition: none; }
  .scoring-action-box:active { transform: none; }
}

/* ── lh-field — label + control stack used in modal forms ────── */
.lh-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lh-field label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--bs-gray-700);
  line-height: 1.2;
}
.lh-field select,
.lh-field input {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.9375rem;
  border: 1px solid var(--bs-gray-400);
  border-radius: 6px;
  background-color: var(--white);
  color: var(--bs-gray-900);
  min-height: 44px;
  appearance: auto;
}
.lh-field select:focus,
.lh-field input:focus {
  border-color: var(--league-primary, var(--navy));
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(20, 33, 61, 0.15);
}
.lh-field select:disabled,
.lh-field input:disabled {
  background-color: var(--bs-gray-100);
  opacity: 0.6;
  cursor: not-allowed;
}

/* Goal type segmented control uses .lh-seg / .lh-seg-item from admin-redesign.css */
