/* ==========================================================================
   GM SPORTS — KIT DE LAYOUT (composicao, nao decoracao)

   Regra unica: o conteudo define o tamanho. Nada de container grande para
   informacao pequena. Medido em 390, 768, 1280 e 1920.

   Carrega DEPOIS das folhas de tela e so define estrutura.
   Contrato completo em docs/DESIGN.md.
   ========================================================================== */

:root {
  --page-max: 1200px;
  --page-max-wide: 1320px;
  --kit-gap: 16px;
  --kit-gap-lg: 24px;
  --kit-field-min: 12rem;
  --kit-field-max: 22rem;
  --kit-void: 48px;
}

/* 1. Coluna de conteudo -------------------------------------------------- */
.stadium-app .board .main,
.modern-shell .board .main {
  width: 100%;
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 2vw, 32px);
}

.kit-wide .main {
  max-width: var(--page-max-wide);
}

/* 2. Faixa de metricas: tamanho vem do conteudo -------------------------- */
.kit-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--kit-gap-lg);
}

.kit-strip > * {
  flex: 0 1 auto;
  min-width: 0;
}

/* 3. Linha de campos: nunca esticada ------------------------------------ */
.kit-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(var(--kit-field-min), max-content));
  justify-content: start;
  align-items: end;
  gap: var(--kit-gap);
}

.kit-fields select,
.kit-fields input {
  width: min(100%, var(--kit-field-max));
  min-width: var(--kit-field-min);
}

/* 4. Grupo: itens relacionados a no maximo 24px -------------------------- */
.kit-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--kit-gap);
}

.kit-group--stack {
  flex-direction: column;
  align-items: stretch;
}

/* 5. Tabela: colunas com largura definida, sem coluna vazia -------------- */
.kit-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.kit-table th,
.kit-table td {
  padding-inline: 8px;
}

.kit-table .col-name { width: auto; }

.kit-table .col-num {
  width: 4.5rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.kit-table .col-score {
  width: 5.5rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.kit-table .col-action {
  width: 6rem;
  text-align: center;
}

/* 6. Card so quando agrupa conteudo: sem altura minima artificial -------- */
.kit-card {
  display: flex;
  flex-direction: column;
  gap: var(--kit-gap);
  min-height: 0;
  height: auto;
  align-self: start;
  padding: clamp(16px, 1.6vw, 24px);
}

/* 7. Nada de vazio no meio ---------------------------------------------- */
.kit-start {
  justify-content: flex-start !important;
  align-items: flex-start !important;
}

/* 8. Grades de cards: cada card com a altura do seu conteudo ------------- */
.stadium-app .board .main .finance-columns,
.modern-shell .board .main .finance-columns {
  align-items: start;
}

/* 10. Barra superior: a busca tem o tamanho de um campo, nao da barra ----- */
.stadium-app header.topbar > .topbar-left > .search,
.modern-shell header.topbar > .topbar-left > .search {
  flex: 0 1 20rem;
  max-width: 20rem;
  min-width: 11rem;
}
@media (max-width: 900px) {
  .stadium-app header.topbar > .topbar-left > .search,
  .modern-shell header.topbar > .topbar-left > .search {
    flex: 1 1 100%;
    max-width: none;
  }
}

/* 10b. Barra superior estreita: tres linhas, nao quatro ------------------ */
@media (max-width: 900px) {
  .stadium-app > header.topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 10px;
    min-height: 0;
    padding: 10px 12px;
  }
  .stadium-app > header.topbar > .club-identity { grid-area: 1 / 1 / 2 / 2; }
  .stadium-app > header.topbar > .topbar-actions { display: contents; }
  .stadium-app > header.topbar > .topbar-actions .user-links {
    grid-area: 1 / 2 / 2 / 3;
    justify-self: end;
    align-self: center;
  }
  .stadium-app > header.topbar > .topbar-left {
    display: flex;
    grid-area: 2 / 1 / 3 / 3;
  }
  .stadium-app > header.topbar > .topbar-actions .chips.club-chips {
    grid-area: 3 / 1 / 4 / 4;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  /* Administrators and moderators have one more link ("Moderation") and, for admins, the Step/Week/Season box: the links take their own row under the club (they used to squeeze the club name to nothing) and the admin box goes last, full width, buttons in one row. */
  .stadium-app > header.topbar > .club-identity { grid-area: 1 / 1 / 2 / 3; }
  .stadium-app > header.topbar > .topbar-actions .user-links { grid-area: 2 / 1 / 3 / 3; justify-self: start; flex-wrap: wrap; gap: 4px 14px; }
  .stadium-app > header.topbar > .topbar-left { grid-area: 3 / 1 / 4 / 3; }
  .stadium-app > header.topbar > .topbar-actions .chips.club-chips { grid-area: 4 / 1 / 5 / 4; }
  .stadium-app > header.topbar > .admin-controls { grid-area: 5 / 1 / 6 / 3; width: 100%; justify-self: stretch; display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; padding: 6px 8px; }
  .stadium-app > header.topbar > .admin-controls .btn { flex: 1 1 0; min-width: 0; padding-inline: 6px; white-space: nowrap; }
}

@media (max-width: 400px) {
  .stadium-app > header.topbar > .topbar-actions .user-links { gap: 2px 4px; }
  .stadium-app > header.topbar > .topbar-actions .user-links a { padding-inline: 4px; font-size: var(--text-md); }
}

/* 9. Balanço da temporada sem movimento: o card aparece, com a mensagem dentro dele ---- */
.stadium-app .board .main .fin-ledger-empty,
.modern-shell .board .main .fin-ledger-empty {
  margin: 0;
  padding: 12px 0 4px;
  color: var(--muted);
  font-size: var(--text-md);
}

/* 12. Fundo tematico por tela ------------------------------------------- */
/* A arte cobre o quadro externo (.board) de ponta a ponta com crop
   e degrade deliberados, mantendo o conteudo (.main) e cards na largura
   confortavel de 1200px, sem distorcer imagens nem gerar vazios laterais.
   Every screen's art is portrait (1536x2752, web/assets/themes/<view>-tall.webp). The art layer (the board's ::before) is FRAMED on the
   subject of each art, not pinned to its top:
   - its height is three quarters of the art's height at the board's width (aspect-ratio), at least min(board, --photo-min), and never
     more than the board: a short, wide board (the Dashboard on a desktop) gets a band of the art around its subject, a phone gets the
     whole art cropped at the sides (--photo-min is one phone screen there);
   - cover fills that box and --photo-pos (x y, set per screen in 12b) puts the subject of the art in view: a value of 50% 45% keeps the
     point at 45% of the art's height at 45% of the box, whatever the box's size;
   - a page taller than the box continues with --view-tile (the abstract tile, repeat-y, 100% wide, its own veil, the board's ::after)
     instead of stretching the art; the box's last --photo-fade pixels are masked out over the tile, so the join has no edge.
   The veil runs over the whole box: lighter at the top (the page header reads under the topbar), darker below so the glass cards and the
   text keep AA contrast. The default, for a screen without art of its own (moderacao and the signed-in manual, novidades, privacidade and
   confirmar: text pages, on purpose), is padrao-tall.webp, the aerial view. No background-attachment: fixed anywhere (it breaks on iOS);
   the browser loads only the current screen's art (and the shared tile, cached once). */
.stadium-app > .board,
.modern-shell .board {
  position: relative;
  overflow: hidden;
  --view-photo: url(/assets/themes/padrao-tall.webp);
  --photo-pos: 50% 45%;
  --photo-ratio: 1536 / 2064;   /* the art's width / 75% of its height: on a long page the box still crops a quarter, so --photo-pos frames it too */
  --photo-min: 1700px;          /* below this height the art covers the whole board; above it, the tile takes over (no stretching) */
  --photo-fade: clamp(120px, 14vw, 220px);
  --photo-bleed: 0px;   /* the old 1600x900 band compensated a painted paper border with a bleed; the -tall art has none */
  --photo-veil: linear-gradient(180deg,
      rgba(7, 25, 34, 0.46) 0,
      rgba(7, 25, 34, 0.58) 30%,
      rgba(8, 29, 38, 0.74) 62%,
      rgba(8, 29, 38, 0.84) 100%);
  --view-tile: url(/assets/themes/abstrato-trecho-01.webp);
  --tile-veil: rgba(8, 29, 38, 0.82);
}

.stadium-app > .board::before,
.modern-shell .board::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: auto;
  width: 100%;   /* explicit: with max-height clamping, aspect-ratio would otherwise shrink the width and leave the art in a strip at the left */
  aspect-ratio: var(--photo-ratio);
  min-height: min(100%, var(--photo-min));
  max-height: 100%;
  background-image: var(--photo-veil), var(--view-photo);
  background-position: var(--photo-pos);
  background-repeat: no-repeat;
  background-size: cover;
  pointer-events: none;
  z-index: 1;   /* over the tile (::after, z 0), under the content (.main, z 1, later in the tree) */
  border-radius: inherit;
  -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - var(--photo-fade)), transparent 100%);
  mask-image: linear-gradient(180deg, #000 calc(100% - var(--photo-fade)), transparent 100%);
}

.stadium-app > .board::after,
.modern-shell .board::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: linear-gradient(var(--tile-veil), var(--tile-veil)), var(--view-tile);
  background-position: center top;
  background-repeat: repeat-y;
  background-size: 100% auto;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}

@media (max-width: 760px) {
  /* A phone is about as tall as the portrait art: a box of one screen shows the whole composition at once, instead of two screens of sky. */
  .stadium-app > .board,
  .modern-shell .board { --photo-min: 1000px; }
  .stadium-app > header.topbar > .club-identity {
    justify-self: stretch;
    width: 100%;
  }
  .stadium-app > header.topbar > .club-identity > .club-details {
    flex: 1 1 0;
    text-align: center;
  }
  .stadium-app > header.topbar > .club-identity .club {
    text-align: center;
  }
}

.stadium-app > .board > .main,
.modern-shell .board > .main {
  position: relative;
  z-index: 1;
}

main.main[data-view],
main.main {
  background-image: none !important;
}

/* 12b. A arte de cada tela e o seu enquadramento ------------------------- */
/* One line per screen: its data-view (main.mjs sets it on the board and on the main), its -tall file and --photo-pos, the point of the art
   (x y, as a fraction of its width and height) that holds its subject: the desk, the trophy, the locker. Three files serve more than one
   screen: conta-tall (conta and amigos, the same page), loja-tall (loja, escudo and camisa) and partida-tall (the match detail and its
   live view: data-view "partida"; "partidas" is the list). To bring a new screen in, add its line here. */
:is(.board[data-view="painel"], .board:has(> .main[data-view="painel"])) { --view-photo: url(/assets/themes/painel-tall.webp); --photo-pos: 55% 50%; }
:is(.board[data-view="comece"], .board:has(> .main[data-view="comece"])) { --view-photo: url(/assets/themes/comece-tall.webp); --photo-pos: 45% 45%; }
:is(.board[data-view="noticias"], .board:has(> .main[data-view="noticias"])) { --view-photo: url(/assets/themes/noticias-tall.webp); --photo-pos: 50% 58%; }
:is(.board[data-view="conquistas"], .board:has(> .main[data-view="conquistas"])) { --view-photo: url(/assets/themes/conquistas-tall.webp); --photo-pos: 50% 35%; }
:is(.board[data-view="financas"], .board:has(> .main[data-view="financas"])) { --view-photo: url(/assets/themes/financas-tall.webp); --photo-pos: 55% 52%; }
:is(.board[data-view="estadio"], .board:has(> .main[data-view="estadio"])) { --view-photo: url(/assets/themes/estadio-tall.webp); --photo-pos: 55% 45%; }
:is(.board[data-view="patrocinio"], .board:has(> .main[data-view="patrocinio"])) { --view-photo: url(/assets/themes/patrocinio-tall.webp); --photo-pos: 55% 45%; }
:is(.board[data-view="tatica"], .board:has(> .main[data-view="tatica"])) { --view-photo: url(/assets/themes/tatica-tall.webp); --photo-pos: 55% 50%; }
:is(.board[data-view="elenco"], .board:has(> .main[data-view="elenco"])) { --view-photo: url(/assets/themes/elenco-tall.webp); --photo-pos: 50% 45%; }
:is(.board[data-view="treino"], .board:has(> .main[data-view="treino"])) { --view-photo: url(/assets/themes/treino-tall.webp); --photo-pos: 60% 55%; }
:is(.board[data-view="base"], .board:has(> .main[data-view="base"])) { --view-photo: url(/assets/themes/base-tall.webp); --photo-pos: 45% 48%; }
:is(.board[data-view="staff"], .board:has(> .main[data-view="staff"])) { --view-photo: url(/assets/themes/staff-tall.webp); --photo-pos: 55% 45%; }
:is(.board[data-view="partidas"], .board:has(> .main[data-view="partidas"])) { --view-photo: url(/assets/themes/partidas-tall.webp); --photo-pos: 50% 45%; }
:is(.board[data-view="partida"], .board:has(> .main[data-view="partida"])) { --view-photo: url(/assets/themes/partida-tall.webp); --photo-pos: 40% 45%; }
:is(.board[data-view="liga"], .board:has(> .main[data-view="liga"])) { --view-photo: url(/assets/themes/liga-tall.webp); --photo-pos: 65% 42%; }
:is(.board[data-view="copa"], .board:has(> .main[data-view="copa"])) { --view-photo: url(/assets/themes/copa-tall.webp); --photo-pos: 60% 80%; }
:is(.board[data-view="internacional"], .board:has(> .main[data-view="internacional"])) { --view-photo: url(/assets/themes/internacional-tall.webp); --photo-pos: 55% 75%; }
:is(.board[data-view="selecoes"], .board:has(> .main[data-view="selecoes"])) { --view-photo: url(/assets/themes/selecoes-tall.webp); --photo-pos: 50% 40%; }
:is(.board[data-view="partida-rapida"], .board:has(> .main[data-view="partida-rapida"])) { --view-photo: url(/assets/themes/partida-rapida-tall.webp); --photo-pos: 50% 45%; }
:is(.board[data-view="ligas-amistosas"], .board:has(> .main[data-view="ligas-amistosas"])) { --view-photo: url(/assets/themes/ligas-amistosas-tall.webp); --photo-pos: 50% 45%; }
:is(.board[data-view="mercado"], .board:has(> .main[data-view="mercado"])) { --view-photo: url(/assets/themes/mercado-tall.webp); --photo-pos: 50% 45%; }
:is(.board[data-view="mensagens"], .board:has(> .main[data-view="mensagens"])) { --view-photo: url(/assets/themes/mensagens-tall.webp); --photo-pos: 55% 50%; }
:is(.board[data-view="chat"], .board:has(> .main[data-view="chat"])) { --view-photo: url(/assets/themes/chat-tall.webp); --photo-pos: 50% 48%; }
:is(.board[data-view="conta"], .board:has(> .main[data-view="conta"])) { --view-photo: url(/assets/themes/conta-tall.webp); --photo-pos: 45% 45%; }
:is(.board[data-view="amigos"], .board:has(> .main[data-view="amigos"])) { --view-photo: url(/assets/themes/conta-tall.webp); --photo-pos: 45% 45%; }
:is(.board[data-view="loja"], .board:has(> .main[data-view="loja"])) { --view-photo: url(/assets/themes/loja-tall.webp); --photo-pos: 45% 40%; }
:is(.board[data-view="escudo"], .board:has(> .main[data-view="escudo"])) { --view-photo: url(/assets/themes/loja-tall.webp); --photo-pos: 45% 40%; }
:is(.board[data-view="camisa"], .board:has(> .main[data-view="camisa"])) { --view-photo: url(/assets/themes/loja-tall.webp); --photo-pos: 45% 40%; }
:is(.board[data-view="clube"], .board:has(> .main[data-view="clube"])) { --view-photo: url(/assets/themes/clube-tall.webp); --photo-pos: 50% 50%; }
:is(.board[data-view="jogador"], .board:has(> .main[data-view="jogador"])) { --view-photo: url(/assets/themes/jogador-tall.webp); --photo-pos: 40% 42%; }

/* 13. Sem rolagem horizontal no celular -------------------------------- */
/* Um bleed de 4px dentro de um cartao virava barra de rolagem na pagina
   inteira. clip nao cria contexto de rolagem, entao sticky continua vivo. */
main.main { overflow-x: clip; }

/* Painel: nome de time dentro de grid precisa poder encolher. */
.stadium-app .dashboard .results .result-teams > * { min-width: 0; }
.stadium-app .dashboard .results .result-teams .team-label { min-width: 0; }
.stadium-app .dashboard .results .rt-mark { flex: 0 0 auto; }
.stadium-app .dashboard .results .result-row { overflow: hidden; }

/* Elenco: a linha de nota, idade e salario quebra em vez de empurrar. */
.gm-squad .squad-card-meta { flex-wrap: wrap; min-width: 0; }
.gm-squad .squad-card-info { min-width: 0; }

/* Tatica: a borda do campo somava 6px a largura de 100%. */
.tactics-page .pitch { box-sizing: border-box; }

/* O nome era um item de grid com justify-self, entao crescia alem da
   coluna e empurrava a linha. max-width prende no trilho. */
.stadium-app .dashboard .results .team-label { max-width: 100%; }

/* (The phone rules of the pitch (width, disc and name sizes) moved into the grid pitch of styles-tactics.css: they sized an absolute-position field that no longer exists.) */

/* Mercado: "transferencias" numa palavra so nao cabia no titulo do hero. */
.gm-hero h1, .gm-hero h2 { overflow-wrap: anywhere; white-space: normal; }
.gm-hero { min-width: 0; }


/* ==========================================================================
   BOTOES (Gabriel, 15/11/2026): UMA definicao para o app inteiro. Todo botao e link-botao (.btn, .primary,
   .ghost, .small, .compact, .danger, .btn-primary/-secondary/-compact, button.btn, a.btn, .btn-icon) le estas
   propriedades, e so o TAMANHO (44 / 40 / 32) muda entre eles. Nenhuma outra folha pinta, arredonda, mede ou
   pesa um botao: as regras antigas (styles.css, modern, sitewide, lote1, views, stadium, tactics, finances,
   review) foram apagadas, nao cobertas. Diferenca entre botoes: tamanho e estado; desabilitado e o mesmo
   dourado esmaecido, e acao destrutiva usa o dialogo de confirmacao, nao cor.
   ========================================================================== */
:root {
  --btn-bg: #d4af37;
  --btn-bg-hover: #e5c158;
  --btn-bg-active: #c19b26;
  --btn-fg: #1c1605;
  --btn-border-width: 1px;
  --btn-border-style: solid;
  --btn-border-color: #f3d677;
  /* Unica variante de cor: acao destrutiva final (Apagar Liga, 18/11/2026). Texto --btn-fg sobre ela: 8,2:1. */
  --btn-danger-bg: #ff8e9b;
  --btn-danger-bg-hover: #ffa3ae;
  --btn-danger-bg-active: #e97b88;
  --btn-danger-border-color: #ffc2c9;
  --btn-radius: 10px;
  --btn-shadow: none;
  --btn-font: var(--font-ui, system-ui);
  --btn-font-weight: 760;
  --btn-letter-spacing: normal;
  --btn-text-transform: none;
  --btn-line-height: 1.25;
  --btn-text-shadow: none;
  --btn-transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
  --btn-h: 44px;
  --btn-font-size: var(--text-md, 14px);
  --btn-pad: 8px 16px;
  --btn-h-small: 40px;
  --btn-font-size-small: var(--text-md, 14px);
  --btn-pad-small: 6px 12px;
  --btn-h-compact: 32px;
  --btn-font-size-compact: var(--text-xs, 12px);
  --btn-pad-compact: 4px 10px;
  /* Coluna de controle (Treino, Elenco, Mercado): a largura do select nao vem do texto da linha, e sim do maior
     rotulo possivel nos dois idiomas (Goalkeeping / Finalizacao), e a altura e uma so na coluna. */
  --control-col: 8rem;
  --control-h: 36px;
  --control-h-touch: 44px;
  /* Etiqueta (chip/badge informativo): fundo translucido discreto, sem caixa de botao. Diferente do botao em cor,
     borda e raio; a cor de estado (bom/ruim/atencao) fica no texto. */
  --tag-bg: rgba(255, 255, 255, .07);
  --tag-radius: 999px;
}

.btn, .btn.primary, .btn.ghost, .btn.danger, .btn.secondary, .btn.small, .btn.compact,
.btn-primary, .btn-secondary, .btn-compact, button.btn, a.btn, .btn-icon {
  background: var(--btn-bg);
  background-image: none;
  color: var(--btn-fg);
  border: var(--btn-border-width) var(--btn-border-style) var(--btn-border-color);
  border-radius: var(--btn-radius);
  box-shadow: var(--btn-shadow);
  font-family: var(--btn-font);
  font-size: var(--btn-font-size);
  font-weight: var(--btn-font-weight);
  letter-spacing: var(--btn-letter-spacing);
  text-transform: var(--btn-text-transform);
  line-height: var(--btn-line-height);
  text-shadow: var(--btn-text-shadow);
  padding: var(--btn-pad);
  min-height: var(--btn-h);
  transition: var(--btn-transition);
  cursor: pointer;
}
/* Link com cara de botao (Gabriel, 18/11/2026: "Comece por aqui" ficava mais alto que "Agora nao"): o <button>
   centraliza o texto sozinho, o <a> nao, e dentro de um flex ele vira block com o texto no topo da caixa. Todo link
   botao centraliza como o <button>. :where() deixa especificidade zero, para nao vencer regra que esconde botao. */
:where(a.btn, a.btn-primary, a.btn-secondary, a.btn-compact, a.btn-icon) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
/* Tamanho 40: linha densa. Tamanho 32: tabela e apoio em linha de texto. */
.btn.small, .btn-secondary {
  min-height: var(--btn-h-small);
  font-size: var(--btn-font-size-small);
  padding: var(--btn-pad-small);
}
.btn.compact, .btn-compact, table :is(td, th) .btn {
  min-height: var(--btn-h-compact);
  font-size: var(--btn-font-size-compact);
  padding: var(--btn-pad-compact);
}
/* Estado: o mesmo dourado, so o tom muda; desabilitado esmaece (nunca cinza). */
.btn:is(:hover, :focus-visible), .btn-primary:is(:hover, :focus-visible), .btn-secondary:is(:hover, :focus-visible),
.btn-compact:is(:hover, :focus-visible) {
  background: var(--btn-bg-hover);
  color: var(--btn-fg);
  border-color: var(--btn-border-color);
}
.btn:active:not(:disabled) { background: var(--btn-bg-active); }
.btn:disabled, .btn[aria-disabled='true'], .btn.disabled, a.btn[aria-disabled='true'] {
  background: var(--btn-bg);
  color: var(--btn-fg);
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
  filter: none;
}
a.btn[aria-disabled='true'], .btn.disabled { pointer-events: none; }

/* Acao destrutiva em vermelho (Gabriel, 18/11/2026: "Apagar Liga ... sera vermelho"). E a UNICA variante de cor do kit: mesma
   geometria, tipografia e transicao do dourado, so o par fundo/texto/borda muda, e continua pedindo o dialogo de confirmacao. A regra
   anterior ("destrutiva usa o dourado") fica valendo para todo o resto do app; esta e a excecao escrita no docs/DESIGN.md. */
.btn.danger {
  background: var(--btn-danger-bg);
  color: var(--btn-fg);
  border-color: var(--btn-danger-border-color);
}
.btn.danger:is(:hover, :focus-visible) { background: var(--btn-danger-bg-hover); border-color: var(--btn-danger-border-color); }
.btn.danger:active:not(:disabled) { background: var(--btn-danger-bg-active); }
.btn.danger:disabled { background: var(--btn-danger-bg); opacity: .45; }

/* Seletor de idioma EN | PT (Gabriel, 18/11/2026: "padroniza, coloca o PT igual"): a caixa e a mesma dos icones das
   redes no rodape (fundo e borda), EN e PT tem o mesmo fundo e a mesma cor de texto; o ativo so ganha texto e borda
   dourados. Unica definicao de cor/forma do seletor; styles.css guarda so o tamanho de toque. */
:root {
  --lang-bg: rgba(6, 25, 37, .4);
  --lang-border: rgba(163, 207, 197, .27);
  --lang-fg: rgb(187, 208, 198);
  --lang-fg-active: var(--btn-border-color);
  --lang-radius: 10px;
}
.lang-switch {
  display: inline-flex; overflow: hidden;
  background: var(--lang-bg); border: 1px solid var(--lang-border); border-radius: var(--lang-radius);
}
.lang-btn, .lang-btn[aria-pressed="true"] {
  background: transparent; color: var(--lang-fg); border: 0; border-radius: 0; box-shadow: none;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--lang-border); }
.lang-btn:hover { color: var(--text); background: transparent; }
.lang-btn[aria-pressed="true"] {
  color: var(--lang-fg-active);
  box-shadow: inset 0 0 0 1px var(--lang-fg-active);
  border-radius: calc(var(--lang-radius) - 1px);
  cursor: default;
}
.lang-btn:focus-visible { outline: 2px solid var(--lang-fg-active); outline-offset: -3px; }

/* Rodape no celular (Gabriel, 18/11/2026: "quero que fique igual da em PT, em 3 linhas"): era um flex que quebrava
   conforme o tamanho do texto, entao em EN ("Privacy", curto) os links subiam para a linha dos icones. Agora sao 3
   linhas fixas nos dois idiomas: Manual + Privacidade / redes + EN|PT / Novidades. As quebras sao os dois
   pseudo-elementos com largura total; .footer-start e display: contents, entao seus filhos entram na ordem. */
@media (max-width: 760px) {
  .site-footer, .stadium-app > .site-footer { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; row-gap: 6px; }  /* cada quebra soma 2 gaps: ~12 px entre linhas */
  .site-footer > .footer-start, .modern-shell.stadium-app > .site-footer > .footer-start { display: contents; }
  .site-footer::before, .site-footer::after { content: ''; flex-basis: 100%; height: 0; }
  .site-footer > .footer-start > a:first-child { order: 1; }
  .site-footer > .footer-start > a:nth-child(2) { order: 2; }
  .site-footer::before { order: 3; }
  .site-footer > .footer-start > .footer-social { order: 4; }
  .site-footer > .lang-switch { order: 5; }
  .site-footer::after { order: 6; }
  .site-footer > .novidades-link { order: 7; }
}
/* 320 px: redes + EN|PT nao cabem com icones de 44 px; a 36 px (toque minimo e 24) as 3 linhas se mantem. */
@media (max-width: 340px) {
  /* styles-review.css (depois desta folha) fixa 44 px com .stadium-app .site-footer ...: daqui o seletor e mais forte. */
  html .site-footer .footer-social { gap: 6px; }
  html .stadium-app .site-footer .footer-social a.auth-social-icon, html .site-footer .footer-social a.auth-social-icon { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
  html .stadium-app .site-footer > .lang-switch .lang-btn { min-height: 36px; }
}
