@font-face {
  font-family: "Roboto";
  src: url("/assets/roboto-379a3832.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 75% 100%;
  font-display: swap;
}

:root {
  --bulma-family-primary: "Roboto", system-ui, sans-serif;
  --bulma-body-line-height: 1.45;
  --bulma-body-color: #15181C;
  --bulma-text: #454C56;
  --bulma-text-strong: #15181C;
  --bulma-link: #15181C;
  --bulma-link-text: #15181C;
  --bulma-danger-h: 4deg;
  --bulma-danger-s: 74%;
  --bulma-danger-l: 49%;
  --bulma-control-radius: 0.75rem;
}

.navbar {
  --bulma-navbar-item-img-max-height: 2rem;
  border-bottom: 1px solid #E5E7EA;
}

.navbar > .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 1rem;
}

.section {
  --bulma-section-padding: 1.5rem 1rem 4rem;
}

/* 48px touch targets, also for the quiet text buttons (Editar, Salir and the rows of a group). */
.button.is-medium, .button.is-text {
  min-height: 3rem;
}

/* Light buttons on a white card need a border to look like buttons in the sun. */
.button.is-light {
  border: 1px solid #C9CED6;
}

/* Score and clock: Barlow Condensed when the phone has it; otherwise the narrow width of the local Roboto. */
.scoreboard {
  font-family: "Barlow Condensed", "Roboto", system-ui, sans-serif;
  font-stretch: 75%;
  font-variant-numeric: tabular-nums;
}

/* 2px line icons, one family */
.line-icon { width: 1.375rem; height: 1.375rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* The content of <details> does not inherit Bulma's border-box in Chrome, so full-width buttons overflowed. */
details * {
  box-sizing: border-box;
}

/* Match screen: grouped cards, like iOS settings */
.group-title { margin: 1.5rem 0.25rem 0.5rem; font-size: 1rem; font-weight: 600; color: #454C56; }
.group { border: 1px solid #E5E7EA; border-radius: 16px; background: #FFFFFF; overflow: hidden; }
.group > * + *, .group details > :not(summary) { border-top: 1px solid #E5E7EA; }
.group-pad { padding: 1rem; }
.group-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-height: 3.25rem; padding: 0.5rem 1rem; }
.hint { margin-top: 0.5rem; color: #454C56; }
.one-line { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Quiet rows: links and folding rows inside a group, with a chevron */
.group .button.is-text { justify-content: flex-start; padding-inline: 1rem; border-radius: 0; font-size: 1rem; font-weight: 600; text-decoration: none; }
.group summary.button { list-style: none; }
.group summary.button::-webkit-details-marker { display: none; }
.group > * + .button { border-top: 1px solid #E5E7EA; }
.group summary.button::after, .group > a.button.is-text::after {
  content: ""; width: 0.5rem; height: 0.5rem; margin-left: auto;
  border: solid #454C56; border-width: 0 2px 2px 0; transform: rotate(-45deg);
}
details[open] > summary.button::after { transform: rotate(45deg); }
.group-summary > :last-child { margin-left: auto; font-weight: 400; }
/* A long team name wraps inside a folding row instead of running over the count. */
.group-summary { height: auto; white-space: normal; text-align: left; }
.group summary.group-summary::after { margin-left: 0.75rem; }

/* Match form: fields inside the cards; a team's code and colors share one row */
.group-pad > .field:last-child, .group-pad > :last-child > .field:last-child { margin-bottom: 0 !important; }
.team-fields { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 0.75rem; }
.match-form { max-width: 40rem; }

/* Match screen: a white header and status band on a soft background, like the approved mockup B */
html:has(.match-screen) { background-color: #F5F6F8; }
/* The status band starts right under the header. */
main:has(.match-screen) { padding-top: 0; }
.match-header { padding: 0.25rem 1rem; background: #FFFFFF; }
.match-header > .container { display: flex; align-items: flex-start; gap: 0.25rem; }
.match-header-text { padding-top: 0.625rem; }
.match-header-text { flex: 1; min-width: 0; }
/* One line per team, so a long name cannot push "+ Gol" under the main button; the score card shows it in full. */
.match-title { display: grid; grid-template-columns: minmax(0, max-content) auto; justify-content: start; align-items: center; column-gap: 0.5rem; font-size: 1.25rem; font-weight: 500; line-height: 1.3; color: #15181C; }
.match-title > .team-id:last-child { grid-column: 1 / -1; }
.match-title .team-id-text { display: flex; align-items: baseline; gap: 0.375rem; min-width: 0; }
.match-title .team-id-name { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.match-title .team-id-code { flex: none; }
.match-vs { color: #454C56; font-size: 1rem; font-weight: 400; }
.match-subtitle { color: #454C56; }
.icon-button { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 3rem; height: 3rem; margin-left: -0.75rem; color: #15181C; }

/* The team as the staff know it: kit stripe (two colors when it has two), full name, code small */
/* The stripe sits next to the first line, so a long name wraps under itself with its code at the end. */
.team-id { display: inline-flex; align-items: flex-start; gap: 0.375rem; min-width: 0; }
.team-stripe { flex: none; width: 6px; height: 1.1em; margin-top: 0.15em; border-radius: 3px; background: linear-gradient(var(--kit) 50%, var(--kit-2) 50%); box-shadow: 0 0 0 1px #E5E7EA; }
.team-id-text { min-width: 0; }
.team-id-code { font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.04em; color: #454C56; }
.match-teams { display: flex; flex-wrap: wrap; align-items: center; column-gap: 0.5rem; font-weight: 600; color: #15181C; }

/* Status band: the polled status frame, always on top. The shadows paint it white from edge to edge without a scroll. */
turbo-frame.match-status {
  display: block; position: sticky; top: 0; z-index: 30;
  margin: 0 0 1rem; padding: 0.5rem 0 0.75rem; background: #FFFFFF;
  box-shadow: 0 0 0 100vmax #FFFFFF, 0 1px 0 100vmax #E5E7EA; clip-path: inset(0 -100vmax -1px);
}
/* Chips: Bulma tags at 15px, the smallest text size of the app. */
.chip { gap: 0.375rem; height: 2.25rem; padding-inline: 0.625rem; border: 1px solid #C9CED6; border-radius: 8px; background: #FFFFFF; color: #15181C; font-size: 0.9375rem; font-weight: 500; }
.chip.is-danger { border-color: #D92D20; background: #D92D20; color: #FFFFFF; font-weight: 700; }
.chip.is-problem { border: 2px solid #D92D20; color: #D92D20; font-weight: 700; }
.chip-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip-dot.is-live { width: 10px; height: 10px; background: #D92D20; }
/* One line each, so the band keeps its height. */
.status-problem { margin-top: 0.5rem; padding-left: 0.5rem; border-left: 4px solid #D92D20; font-weight: 600; color: #15181C; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* The pause banner is a card under the band, so it scrolls away. */
.status-banner { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 0.75rem; margin-bottom: 1rem; padding: 1rem; border-radius: 16px; background: #FFFFFF; color: #15181C; }
.status-banner > form { grid-column: 1 / -1; }

/* Score card: the clock on top, then both teams with their kit color on top */
.board { display: grid; gap: 0.875rem; padding: 1rem; border-radius: 16px; background: #FFFFFF; }
.board-clock-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.25rem 0.75rem; }
.board-time { font-size: 2rem; font-weight: 600; line-height: 1.1; color: #15181C; }
.board-teams { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
/* Subgrid lines up the names, the scores, the scorer fields and the buttons of both teams. */
.board-team { display: grid; grid-row: span 4; grid-template-rows: subgrid; gap: 0.5rem; padding: 0.75rem 0.5rem; border-radius: 12px; background: #F5F6F8; text-align: center; }
.board-team-name { align-self: center; justify-self: center; }
.board-team .field { margin-bottom: 0.25rem !important; text-align: left; }
.board-team-name { font-size: 1rem; font-weight: 500; line-height: 1.3; color: #15181C; }
/* A bigger stripe in the score card, so the kit shows at a glance. */
.board-team-name .team-stripe { align-self: stretch; width: 10px; height: auto; min-height: 1.75em; margin-top: 0; border-radius: 5px; }
.board-team-name .team-id { align-items: center; text-align: left; }
.team-goals { font-size: 4rem; font-weight: 700; line-height: 1; color: #15181C; }
.plus-minus { display: grid; grid-template-columns: 3rem 1fr; gap: 0.5rem; }
.plus-minus .button { min-height: 3.25rem; padding-inline: 0.5rem; }
.plus-minus .button.is-dark { font-weight: 700; font-size: 1.0625rem; }

/* Penalties: each team with its shots, then its two buttons */
.penalty-row { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-weight: 500; color: #15181C; }
.penalty-row .team-goals { font-size: 2.5rem; }
.shots { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; min-height: 1.5rem; margin: 0.25rem 0 0.75rem; list-style: none; }
.shot.is-missed { color: #D92D20; font-weight: 700; }
.next-match .eyebrow { margin-bottom: 0.25rem; font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #454C56; }
.next-match { margin-top: 1rem; }
.goal-row { flex-wrap: wrap; }
.external-link { display: inline-flex; align-items: center; gap: 0.375rem; min-height: 3rem; font-weight: 600; text-decoration: underline; }
.external-link .line-icon { width: 1.125rem; height: 1.125rem; }

/* Broadcast steps: a checklist */
.step { display: grid; grid-template-columns: 2rem 1fr; gap: 0.75rem; padding: 1rem; }
.step-icon {
  display: flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem;
  border-radius: 50%; box-shadow: inset 0 0 0 2px #E5E7EA; font-weight: 700; color: #454C56;
}
.step.is-current .step-icon { box-shadow: inset 0 0 0 2px #15181C; color: #15181C; }
.step.is-done .step-icon { background: #15181C; box-shadow: none; color: #FFFFFF; }
.step.is-live .step-icon { background: #D92D20; box-shadow: none; }
.step.is-live .step-icon::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #FFFFFF; }
.step.is-done { padding-block: 0.75rem; }
.step-title { font-size: 1.0625rem; font-weight: 600; color: #15181C; }
.step-text { color: #454C56; }
.step.is-live .step-text { color: #D92D20; font-weight: 600; }
.step-body > :is(form, a) { margin-top: 0.75rem; }

.video-frame { display: block; border-radius: 16px; overflow: hidden; background: #22272D; }
.ad-tile { flex-direction: column; min-height: 4rem; height: auto; white-space: normal; line-height: 1.2; }
.ad-tile small { color: #454C56; }

/* Bottom navigation in reach of the thumb, above the iPhone home bar; on a wide screen the tabs stay in the middle */
.tabbar {
  position: fixed; inset: auto 0 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 0 max(0.25rem, calc(50vw - 22rem)) env(safe-area-inset-bottom); border-top: 1px solid #E5E7EA; background: #FFFFFF;
}
/* Bulma makes every section a block, which beat the hidden attribute. */
.tabbar[hidden], [role="tabpanel"][hidden] { display: none; }
main:has(.tabbar:not([hidden])) { padding-bottom: calc(11rem + env(safe-area-inset-bottom)); }
/* Each tab fills its whole cell, so no tap falls between two tabs; the selected pill sits behind the icon. */
.tab {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.25rem;
  min-height: 5rem; border: 0; background: none; color: #454C56; font: inherit; font-size: 0.9375rem; cursor: pointer;
}
.tab-indicator { display: flex; align-items: center; justify-content: center; width: 3.5rem; height: 2rem; border-radius: 1rem; }
.tab[aria-selected="true"] { color: #15181C; font-weight: 700; }
.tab[aria-selected="true"] .tab-indicator { background: #E5E7EA; }
.tab-dot { position: absolute; top: 0.75rem; left: calc(50% + 0.75rem); width: 10px; height: 10px; border-radius: 50%; background: #D92D20; box-shadow: 0 0 0 2px #FFFFFF; }

/* The main button of the moment floats above the tabs, at the right, like the mockup */
/* 22rem is half of Bulma's is-max-tablet column (705px). */
.main-action { position: fixed; z-index: 41; right: max(1rem, calc(50vw - 22rem)); bottom: calc(6rem + env(safe-area-inset-bottom)); }
.fab { gap: 0.625rem; min-height: 3.5rem; padding-inline: 1.25rem; border-radius: 16px; font-weight: 700; box-shadow: 0 4px 12px rgba(21, 24, 28, 0.25); }
