/* ===================================================
   MOBILE / RESPONSIVE BREAKPOINTS
=================================================== */

/* ── Hamburger toggle (hidden on desktop) ── */
.sidebar-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 36px; height: 36px;
  align-items: center; justify-content: center;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
}

/* ── Sidebar overlay (mobile only) ── */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 49;
}

/* ===== TABLET  (<1024px) ===== */
@media (max-width: 1024px) {
  :root {
    --hour-px: 60px;
    --label-w: 100px;
  }
  .topbar { padding: 0 16px; }
  .cal-toolbar { padding: 10px 16px; }
  .cal-wrap { padding: 0 16px 16px; }
  .page-bar { padding: 12px 16px; }
  .campo-bar { padding: 0 16px; }
  .date-display { min-width: 170px; font-size: 16px; }
  .legend { gap: 8px; }
}

/* ===== MOBILE  (<768px) ===== */
@media (max-width: 768px) {
  :root {
    --hour-px: 50px;
    --row-h: 80px;
    --label-w: 80px;
    --topbar-h: 54px;
  }

  /* Hamburger visible */
  .sidebar-toggle { display: flex; }

  /* Sidebar: off-screen by default, shown with .open */
  .sidebar {
    position: fixed;
    left: -260px;
    top: 0;
    width: 260px;
    z-index: 100;
    transition: left 0.25s ease;
  }
  .sidebar.open { left: 0; }
  .sidebar-overlay.show { display: block; }

  /* Topbar */
  .topbar { padding: 0 12px; gap: 8px; }
  .topbar-title { font-size: 16px; }
  .topbar-sub { font-size: 10px; }
  .topbar-date { display: none; }

  /* Calendar toolbar */
  .cal-toolbar { flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
  .date-display { min-width: 140px; font-size: 15px; }
  .legend { display: none; }

  /* Calendar */
  .cal-wrap { padding: 0 8px 12px; }

  /* Week view: force horizontal scroll */
  .wk-grid { min-width: 600px; }

  /* Page bars */
  .page-bar { padding: 10px 12px; flex-wrap: wrap; gap: 8px; }

  /* Campo filter bar */
  .campo-bar { padding: 0 12px; height: 40px; gap: 6px; }
  .campo-chip { font-size: 11px; padding: 4px 10px; }

  /* Stats grid */
  .stat-cards { flex-wrap: wrap; gap: 8px; padding: 8px 12px; }
  .stat-card { min-width: calc(50% - 4px); }

  /* Modals: full-width on mobile */
  .modal { width: 95vw !important; max-width: 95vw !important; max-height: 90vh; }
  .modal-body { max-height: 70vh; overflow-y: auto; }

  /* Side panel: full width */
  #side-panel { width: 100vw; max-width: 100vw; }

  /* Admin filters */
  .admin-filter-row { flex-wrap: wrap; gap: 6px; }

  /* Pitch cards grid */
  .pitch-grid { grid-template-columns: 1fr !important; }

  /* Tournament cards */
  .tourn-card { min-width: unset; width: 100%; }
}

/* ===== SMALL PHONES  (<480px) ===== */
@media (max-width: 480px) {
  :root {
    --hour-px: 44px;
    --row-h: 70px;
    --label-w: 64px;
  }

  .stat-card { min-width: 100%; }
  .tl-pitch-name { font-size: 11px; }
  .tl-pitch-sub { font-size: 9px; }
  .bk-title { font-size: 10px; }
  .bk-time { font-size: 9px; }
  .bk-price { font-size: 10px; }
  .wk-pill { font-size: 9px; padding: 2px 5px; }
}
