/* ==========================================================
   Goooool.net · adaptação progressiva para telas grandes
   ----------------------------------------------------------
   Este arquivo nunca substitui o CSS mobile. Ele só aproveita
   largura adicional quando o navegador tem pelo menos 960 px.
   O DOM, o motor, o estado e os controles continuam sendo os
   mesmos da experiência mobile.
   ========================================================== */

@media (min-width: 960px) {
  /* A largura extra só é liberada enquanto a página da partida existe.
     As demais telas continuam com o shell mobile canônico até serem
     avaliadas individualmente em futuras etapas. */
  .game-shell:has(.match-screen) {
    width: min(100vw, 1600px) !important;
    max-width: none !important;
  }

  .game-shell:has(.match-screen) .app-screen > .content {
    overflow: hidden !important;
    padding: 0 !important;
  }

  .game-shell:has(.match-screen) #view {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
  }

  /* Ao Vivo desktop: cabeçalho comum, campo/comandos à esquerda e
     informações à direita. Não existe uma segunda página de partida. */
  .game-shell:has(.match-screen) .match-screen,
  .game-shell:has(.match-screen) .match-screen.is-finished:not(.is-post-match-view),
  .game-shell:has(.match-screen) .match-screen.is-live-pitch-disabled:not(.is-post-match-view) {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    padding: 10px 12px 12px !important;
    display: grid !important;
    grid-template-columns: minmax(520px, 1.35fr) minmax(340px, .9fr) !important;
    grid-template-rows: 44px minmax(0, 1fr) !important;
    grid-template-areas:
      "cabecalho cabecalho"
      "campo informacoes" !important;
    column-gap: 12px !important;
    row-gap: 10px !important;
    align-items: stretch !important;
    overflow: hidden !important;
  }

  .game-shell:has(.match-screen) .match-screen > .match-header {
    grid-area: cabecalho !important;
    width: 100% !important;
    height: 44px !important;
    min-height: 44px !important;
    margin: 0 !important;
    padding: 6px 10px !important;
  }

  .game-shell:has(.match-screen) .match-screen .match-header > div > strong {
    max-width: none !important;
    font-size: .78rem !important;
  }

  .game-shell:has(.match-screen) .match-screen .match-header > div > span {
    font-size: .58rem !important;
  }

  .game-shell:has(.match-screen) .match-screen .match-header .minute {
    min-width: 50px !important;
    font-size: .78rem !important;
  }

  .game-shell:has(.match-screen) .match-screen > .pitch-score {
    grid-area: campo !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 5px !important;
    gap: 4px !important;
    grid-template-rows: 42px auto auto !important;
    overflow: hidden !important;
  }

  .game-shell:has(.match-screen) .match-screen > .pitch-score > .fixture-card {
    height: 42px !important;
    min-height: 42px !important;
    padding-inline: 6px !important;
  }

  .game-shell:has(.match-screen) .match-screen .pitch-score .fixture-team.team-tone {
    height: 40px !important;
    min-height: 40px !important;
    padding: 3px 8px !important;
    gap: 7px !important;
  }

  .game-shell:has(.match-screen) .match-screen .pitch-score .fixture-team .crest {
    width: 24px !important;
    height: 29px !important;
  }

  .game-shell:has(.match-screen) .match-screen .pitch-score .fixture-team strong {
    max-width: 180px !important;
    font-size: .68rem !important;
  }

  .game-shell:has(.match-screen) .match-screen .pitch-score .score {
    font-size: clamp(1.2rem, 2vw, 1.7rem) !important;
    font-variant-numeric: tabular-nums;
  }

  /* O campo usa sua proporção horizontal natural em vez de crescer pela
     altura inteira do monitor. Isso é o principal antídoto para o campo
     ocupar 70–80% da experiência em desktop. */
  .game-shell:has(.match-screen) .match-screen:not(.is-live-pitch-disabled) > .pitch-score > .live-pitch-shell {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    align-self: start !important;
  }

  .game-shell:has(.match-screen) .match-screen:not(.is-live-pitch-disabled) .live-pitch-canvas {
    width: 100% !important;
    height: auto !important;
    max-height: min(51dvh, 500px) !important;
    aspect-ratio: 960 / 470 !important;
    object-fit: contain !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-pitch-caption {
    min-height: 24px !important;
    height: 24px !important;
    padding-inline: 8px !important;
  }

  .game-shell:has(.match-screen) .match-screen > .pitch-score > .live-management-bar {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 5px !important;
    border-radius: 0 0 8px 8px !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-management-actions {
    display: grid !important;
    grid-template-columns: none !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    gap: 5px !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-management-actions .btn,
  .game-shell:has(.match-screen) .match-screen :is(.live-pause-button,#liveStrategyBtn,#liveSubstitutionBtn,#liveRolesBtn,#liveIntegrityBtn,#skipMatchBtn) {
    min-height: 42px !important;
    height: 42px !important;
    padding: 4px 6px !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-management-actions .btn > .live-action-label {
    font-size: .56rem !important;
  }

  .game-shell:has(.match-screen) .match-screen > .live-information-panel {
    grid-area: informacoes !important;
    align-self: stretch !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
    border-bottom: 1px solid var(--line) !important;
    grid-template-rows: 48px minmax(0, 1fr) !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-information-panel > .live-info-tabs {
    display: flex !important;
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    margin: 0 !important;
    padding: 4px !important;
    gap: 3px !important;
    overflow: hidden !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-information-panel > .live-info-tabs > button {
    flex: 1 1 0 !important;
    width: auto !important;
    min-width: 0 !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 4px 3px !important;
  }

  /* No mobile o texto curto continua sendo usado. Em desktop o mesmo span
     revela o rótulo completo pelo atributo, sem duplicar botões ou eventos. */
  .game-shell:has(.match-screen) .match-screen .live-info-tabs .live-tab-label {
    font-size: 0 !important;
    line-height: 1 !important;
    text-overflow: clip !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-info-tabs .live-tab-label::after {
    content: attr(data-full-label);
    font-size: .58rem;
    line-height: 1;
    white-space: nowrap;
  }

  .game-shell:has(.match-screen) .match-screen .live-info-workspace {
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
  }

  /* Conteúdo que realmente ganha legibilidade com largura lateral. */
  .game-shell:has(.match-screen) .match-screen .football-team-sheets {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-match-reading {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-match-reading article:last-child {
    grid-column: auto !important;
  }

  /* Campo desligado continua compacto; a largura extra não cria um grande
     espaço vazio na coluna esquerda. */
  .game-shell:has(.match-screen) .match-screen.is-live-pitch-disabled:not(.is-post-match-view) > .pitch-score {
    grid-template-rows: 54px 28px auto !important;
    height: auto !important;
  }

  .game-shell:has(.match-screen) .match-screen.is-turbo-live.is-live-pitch-disabled:not(.is-post-match-view) > .pitch-score {
    grid-template-rows: 54px 36px auto !important;
  }

  /* Pós-jogo é conteúdo, não transmissão: quando o campo sai da tela, o painel
     volta a aproveitar as duas colunas sem deixar metade do monitor vazia. */
  .game-shell:has(.match-screen) .match-screen.is-finished.is-post-match-view {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: 44px minmax(0, 1fr) !important;
    grid-template-areas:
      "cabecalho"
      "informacoes" !important;
  }

  .game-shell:has(.match-screen) .match-screen.is-finished.is-post-match-view > .live-information-panel {
    grid-area: informacoes !important;
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
  }
}

@media (min-width: 1360px) {
  .game-shell:has(.match-screen) {
    width: min(calc(100vw - 28px), 1600px) !important;
  }

  .game-shell:has(.match-screen) .match-screen,
  .game-shell:has(.match-screen) .match-screen.is-finished:not(.is-post-match-view),
  .game-shell:has(.match-screen) .match-screen.is-live-pitch-disabled:not(.is-post-match-view) {
    grid-template-columns: minmax(0, 1.42fr) minmax(420px, .88fr) !important;
    column-gap: 16px !important;
    padding-inline: 16px !important;
  }

  .game-shell:has(.match-screen) .match-screen .pitch-score .fixture-team strong {
    max-width: 240px !important;
    font-size: .72rem !important;
  }

  .game-shell:has(.match-screen) .match-screen .live-info-tabs .live-tab-label::after {
    font-size: .62rem;
  }
}

@media (min-width: 960px) and (max-height: 700px) {
  .game-shell:has(.match-screen) .match-screen,
  .game-shell:has(.match-screen) .match-screen.is-finished:not(.is-post-match-view),
  .game-shell:has(.match-screen) .match-screen.is-live-pitch-disabled:not(.is-post-match-view) {
    grid-template-rows: 40px minmax(0, 1fr) !important;
    row-gap: 6px !important;
    padding-block: 6px 8px !important;
  }

  .game-shell:has(.match-screen) .match-screen > .match-header {
    height: 40px !important;
    min-height: 40px !important;
  }

  .game-shell:has(.match-screen) .match-screen:not(.is-live-pitch-disabled) .live-pitch-canvas {
    max-height: min(48dvh, 360px) !important;
  }
}

/* ==========================================================
   V504 · navegação lateral persistente fora da partida
   ----------------------------------------------------------
   A partir de 960 px a lateral já usa a versão completa com
   ícone + texto. Não existe mais faixa compacta intermediária.
   O botão Jogar migra para a própria lateral e reutiliza a mesma
   ação canônica do mobile. A partida continua sendo a exceção V500.
   ========================================================== */
@media (min-width: 960px) {
  .game-shell:not(:has(.match-screen)) {
    width: min(calc(100vw - 16px), 1560px) !important;
    max-width: none !important;
    min-height: 100dvh;
  }

  .game-shell:not(:has(.match-screen)) .app-screen {
    height: 100dvh !important;
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: 224px minmax(0, 1fr) !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    grid-template-areas:
      "lateral topo"
      "lateral conteudo" !important;
  }

  .game-shell:not(:has(.match-screen)) .app-screen > .topbar {
    grid-area: topo !important;
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0 !important;
  }

  .game-shell:not(:has(.match-screen)) .app-screen > .content {
    grid-area: conteudo !important;
    grid-column: 2 !important;
    grid-row: 2 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding-bottom: 18px !important;
  }

  .game-shell:not(:has(.match-screen)) .app-screen > .content > #view {
    width: min(100%, 1240px) !important;
    min-width: 0 !important;
    margin-inline: auto !important;
  }

  /* A barra inferior e o botão de três pontos resolvem a falta de espaço do
     celular. No desktop suas funções migram para a lateral persistente. */
  .game-shell:not(:has(.match-screen)) .app-screen > .navbar,
  .game-shell:not(:has(.match-screen)) [data-topbar-menu] {
    display: none !important;
  }

  .game-shell:not(:has(.match-screen)) .desktop-side-nav {
    grid-area: lateral !important;
    grid-column: 1 !important;
    grid-row: 1 / -1 !important;
    display: flex !important;
    flex-direction: column !important;
    width: 224px !important;
    min-width: 224px !important;
    min-height: 0 !important;
    padding: 10px 10px calc(10px + var(--safe-bottom)) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    background: color-mix(in srgb, var(--panel) 97%, black 3%);
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 26px rgba(0,0,0,.08);
    scrollbar-width: thin;
    z-index: 12;
  }

  .desktop-side-brand {
    min-height: 48px;
    margin-bottom: 8px;
    padding: 6px 10px;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--panel-2) 92%, transparent);
    border: 1px solid var(--line);
    color: var(--text);
  }

  .desktop-side-brand-icon,
  .desktop-side-icon,
  .desktop-side-play-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 10px;
  }

  .desktop-side-brand-icon { font-size: 1.05rem; }

  .desktop-side-brand-copy,
  .desktop-side-text,
  .desktop-side-play-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
  }

  .desktop-side-brand-copy strong,
  .desktop-side-text strong,
  .desktop-side-play-copy strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-side-brand-copy strong { font-size: .86rem; }

  /* Jogar é CTA de marca: usa a mesma paleta fixa do botão mobile e nunca herda cor do clube. */
  .desktop-side-play {
    width: 100%;
    min-height: 52px;
    margin: 0 0 9px;
    padding: 7px 9px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    border: 1px solid color-mix(in srgb, var(--play-cta-start, #22c55e) 58%, #ffffff 10%) !important;
    border-radius: 13px;
    background: linear-gradient(180deg, var(--play-cta-start, #22c55e), var(--play-cta-end, #15803d)) !important;
    color: var(--play-cta-text, #ffffff) !important;
    cursor: pointer;
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 0 8px 18px var(--play-cta-shadow, rgba(21,128,61,.34)) !important;
  }

  .desktop-side-play:hover,
  .desktop-side-play:focus-visible {
    filter: brightness(1.06);
    transform: translateY(-1px);
  }

  .desktop-side-play:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--play-cta-start, #22c55e) 72%, white 18%);
    outline-offset: 2px;
  }

  .desktop-side-play:disabled,
  .desktop-side-play[aria-busy="true"] {
    opacity: .65;
    cursor: wait;
    transform: none;
  }

  .desktop-side-play-copy strong { font-size: .78rem; font-weight: 800; }
  .desktop-side-play-copy small { font-size: .55rem; opacity: .78; }
  .desktop-side-play-icon { font-size: 1rem; background: rgba(255,255,255,.18); }
  .desktop-side-play :is(.desktop-side-play-icon,.desktop-side-play-copy,.fa-solid,.fa-regular,strong,small,span) {
    color: var(--play-cta-text, #ffffff) !important;
    -webkit-text-fill-color: currentColor !important;
  }

  .desktop-side-primary,
  .desktop-side-utilities {
    display: grid;
    gap: 4px;
  }

  .desktop-side-utilities { margin-top: auto; }

  .desktop-side-separator {
    height: 1px;
    flex: 0 0 1px;
    margin: 9px 6px;
    background: var(--line);
  }

  .desktop-side-item {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 9px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    text-align: left;
  }

  .desktop-side-item:hover,
  .desktop-side-item:focus-visible {
    color: var(--text);
    background: color-mix(in srgb, var(--panel-2) 88%, var(--primary) 12%);
    border-color: color-mix(in srgb, var(--line) 72%, var(--primary) 28%);
  }

  .desktop-side-item:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary) 72%, white 18%);
    outline-offset: 1px;
  }

  .desktop-side-item.is-active {
    color: var(--text);
    background: color-mix(in srgb, var(--primary) 14%, var(--panel-2));
    border-color: color-mix(in srgb, var(--primary) 38%, var(--line));
  }

  .desktop-side-item.is-active::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: var(--primary);
  }

  .desktop-side-item:disabled {
    opacity: .38;
    cursor: not-allowed;
  }

  .desktop-side-item .desktop-side-icon {
    font-size: .98rem;
    color: currentColor;
  }

  .desktop-side-text { flex: 1 1 auto; }
  .desktop-side-text strong { font-size: .72rem; font-weight: 650; }
  .desktop-side-text small {
    min-width: 0;
    overflow: hidden;
    color: var(--muted);
    font-size: .54rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-side-item.is-active .desktop-side-text small {
    color: color-mix(in srgb, var(--text) 74%, var(--muted));
  }

  /* A partida é a exceção: mantém o layout amplo V500 e não reserva
     espaço para a lateral persistente. */
  .game-shell:has(.match-screen) .desktop-side-nav {
    display: none !important;
  }
}

/* ==========================================================
   V505 · Home inicial em duas colunas quando houver largura real
   ----------------------------------------------------------
   A abertura sem carreira carregada continua usando o mesmo DOM e as
   mesmas ações do mobile. Entre 960 e 1179 px a Home apenas ganha largura;
   a partir de 1180 px o conteúdo é reorganizado em duas áreas semânticas:
   começar/continuar à esquerda e ajuda/informações à direita.
   ========================================================== */
@media (min-width: 960px) and (max-width: 1179.98px) {
  .setup-screen.landing-v99 .landing-choice-shell {
    width: min(calc(100% - 40px), 760px) !important;
  }

  .setup-screen.landing-v99 .landing-large-columns,
  .setup-screen.landing-v99 .landing-large-primary,
  .setup-screen.landing-v99 .landing-large-support {
    min-width: 0;
  }
}

@media (min-width: 1180px) {
  .setup-screen.landing-v99 .landing-choice-shell {
    width: min(calc(100% - 56px), 1240px) !important;
    padding-top: 30px !important;
  }

  .setup-screen.landing-v99 .landing-choice-hero {
    max-width: 820px;
    margin-inline: auto;
  }

  .setup-screen.landing-v99 .landing-choice-hero h1 {
    font-size: clamp(2.15rem, 4vw, 3.2rem);
  }

  .setup-screen.landing-v99 .landing-large-columns {
    margin-top: 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    align-items: start;
    gap: 18px;
  }

  .setup-screen.landing-v99 .landing-large-primary,
  .setup-screen.landing-v99 .landing-large-support {
    min-width: 0;
  }

  .setup-screen.landing-v99 .landing-large-primary {
    display: grid;
    align-content: start;
    gap: 14px;
  }

  .setup-screen.landing-v99 .landing-large-support {
    display: grid;
    align-content: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: color-mix(in srgb, var(--panel) 92%, transparent);
    box-shadow: 0 16px 34px rgba(0,0,0,.08);
  }

  .setup-screen.landing-v99 .landing-recent-careers,
  .setup-screen.landing-v99 .landing-mode-grid.setup-mode-switch,
  .setup-screen.landing-v99 .landing-setup-stage,
  .setup-screen.landing-v99 .landing-secondary-actions,
  .setup-screen.landing-v99 .landing-public-pages,
  .setup-screen.landing-v99 .landing-community-callout-final,
  .setup-screen.landing-v99 .landing-seo-footer {
    margin-top: 0 !important;
  }

  .setup-screen.landing-v99 .landing-mode-grid.setup-mode-switch {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  .setup-screen.landing-v99 .landing-mode-grid.setup-mode-switch > .landing-scenario-mode {
    grid-column: 1 / -1;
    min-height: 150px;
  }

  .setup-screen.landing-v99 .landing-setup-stage {
    padding-top: 16px;
  }

  .setup-screen.landing-v99 .landing-career-card,
  .setup-screen.landing-v99 .landing-create-card,
  .setup-screen.landing-v99 .landing-save-card {
    width: 100% !important;
    max-width: none !important;
  }

  .setup-screen.landing-v99 .landing-secondary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .setup-screen.landing-v99 .landing-secondary-actions > :is(button,label,span,a) {
    min-height: 52px;
    justify-content: flex-start;
    padding: 10px 12px;
    text-align: left;
    font-size: .62rem;
  }

  .setup-screen.landing-v99 .landing-public-pages {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    padding: 0 !important;
  }

  .setup-screen.landing-v99 .landing-public-pages button {
    min-height: 58px;
    align-items: flex-start;
    justify-content: center;
    padding: 9px 11px;
    font-size: .59rem;
    text-align: left;
  }

  .setup-screen.landing-v99 .landing-public-pages button > span {
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .setup-screen.landing-v99 .landing-community-callout-final {
    grid-template-columns: 44px minmax(0, 1fr) !important;
    gap: 10px;
  }

  .setup-screen.landing-v99 .landing-community-callout-final > a {
    grid-column: 1 / -1;
  }

  .setup-screen.landing-v99 .landing-seo-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-items: stretch;
    gap: 6px;
    padding-top: 2px;
  }

  .setup-screen.landing-v99 .landing-seo-footer a {
    display: block;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--panel-2);
    color: var(--muted);
    text-align: left;
  }
}

@media (min-width: 1500px) {
  .setup-screen.landing-v99 .landing-choice-shell {
    width: min(calc(100% - 72px), 1320px) !important;
  }

  .setup-screen.landing-v99 .landing-large-columns {
    grid-template-columns: minmax(0, 1.14fr) minmax(390px, .86fr);
    gap: 22px;
  }
}
