﻿/**
 * Tablet / desktop — pantallas no táctiles y viewports amplios
 */

@media (min-width: 520px) {
  body,
  .app-body {
    display: flex;
    align-items: stretch;
    justify-content: center;
  }
}

@media (min-width: 768px) {
  .site-header {
    order: 0;
  }

  .bottom-nav {
    order: 1;
  }

  .app-content {
    order: 2;
    flex: 1;
  }
  :root {
    --app-max-width: min(960px, 96vw);
    --bottom-nav-h: 52px;
    --touch-min: 40px;
    --header-emblem-size: 42px;
  }

  .app-shell {
    min-height: 100dvh;
  }

  .bottom-nav {
    position: static;
    transform: none;
    left: auto;
    flex-shrink: 0;
    max-width: none;
    width: 100%;
    min-height: var(--bottom-nav-h);
    padding: 8px 16px;
    gap: 8px;
    border-top: none;
    border-bottom: 1px solid var(--border);
    box-shadow: none;
  }

  .tab-btn {
    flex-direction: row;
    gap: 8px;
    min-height: var(--touch-min);
    padding: 10px 18px;
    font-size: 0.875rem;
    border-radius: 10px;
  }

  .tab-icon {
    width: 20px;
    height: 20px;
  }

  .app-content {
    padding: 20px 24px 28px;
  }

  .scroll-hint {
    display: none;
  }

  .site-header h1 {
    font-size: 1.15rem;
  }

  .header-tagline {
    font-size: 0.72rem;
  }

  #schedule-group .schedule-day,
  #schedule-knockout .schedule-day {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    align-items: start;
  }

  #schedule-group .schedule-day h3,
  #schedule-knockout .schedule-day h3 {
    grid-column: 1 / -1;
    position: static;
    background: transparent;
    backdrop-filter: none;
    font-size: 0.95rem;
  }

  #schedule-knockout .phase-title {
    grid-column: 1 / -1;
  }

  #schedule-group .match-card,
  #schedule-knockout .match-card {
    margin-bottom: 0;
  }

  .match-teams {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }

  .bracket-scroll {
    margin: 0;
    padding: 0 0 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--wc-green-light) transparent;
  }

  .bracket-scroll::-webkit-scrollbar {
    display: block;
    height: 8px;
  }

  .bracket-scroll::-webkit-scrollbar-thumb {
    background: rgba(45, 106, 79, 0.35);
    border-radius: 4px;
  }

  .standings-cards {
    display: none;
  }

  .standings-table-desktop {
    display: block;
  }

  .group-picks-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .quiniela-toolbar {
    flex-direction: row;
    align-items: center;
  }

  .quiniela-toolbar p {
    flex: 1;
  }

  .toolbar-actions {
    grid-template-columns: auto auto;
    justify-content: flex-end;
  }

  .group-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

@media (min-width: 1024px) {
  :root {
    --app-max-width: min(1140px, 94vw);
  }

  #schedule-group .schedule-day,
  #schedule-knockout .schedule-day {
    grid-template-columns: repeat(3, 1fr);
  }

  .group-picks-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .app-content {
    padding: 24px 32px 32px;
  }
}

@media (min-width: 1280px) {
  :root {
    --app-max-width: min(1280px, 92vw);
  }

  #schedule-group .schedule-day {
    grid-template-columns: repeat(4, 1fr);
  }

  .group-picks-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (hover: hover) and (pointer: fine) {
  .tab-btn:active,
  .match-card:active,
  .pick-team:active,
  .btn:active,
  .group-tab:active,
  .bracket-team.clickable:active {
    transform: none;
  }

  .tab-btn:hover:not(.active) {
    background: rgba(26, 77, 62, 0.06);
  }

  .match-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
  }

  .pick-team:hover {
    border-color: var(--border);
    box-shadow: var(--shadow-sm);
  }

  .group-tab:hover:not(.active) {
    background: rgba(26, 77, 62, 0.05);
  }

  .bracket-team.clickable:hover {
    background: rgba(26, 77, 62, 0.08);
  }

  .btn:hover {
    background: var(--card);
  }

  body,
  .app-body {
    touch-action: auto;
  }
}