/* mobile-flows.css — mobile optimalisaties (geladen ná app.css)
   Eigendom van de "interactive flows + profiles"-agent.
   App.css doet al: .grid-2/.grid-3/.stat-grid/.form-grid → 1fr @768px
   + custom .score-row layout @480px + uitslag-row tweaks @640px.
   Hier vullen we aan voor inline-grids/flex-rows in views,
   touch-target sizes en specifieke pagina's. */

/* ───────── 768 px ───────── */
@media (max-width: 768px) {
  /* Touch targets */
  .btn-sm { min-height: 38px; padding: 8px 12px; }
  .btn    { min-height: 44px; }

  /* Container minder padding op mobiel */
  .container { padding-left: 14px; padding-right: 14px; }

  /* sessions/create + edit kolomtitels boven score-rows verbergen */
  .score-row-header { display: none; }

  /* Invite-box (groups/show) — actions onder de link op één regel */
  .invite-box { flex-direction: column; align-items: stretch; }
  .invite-actions { display: flex; flex-wrap: wrap; gap: 6px; }
  .invite-actions .btn { flex: 1 1 30%; justify-content: center; min-width: 0; }

  /* sui-banners op groups/show iets compacter */
  .sui-banner { padding: 12px 14px; }
  .sui-banner-icon { font-size: 24px; }

  /* "Meest gespeeld" progress bar mag korter */
  .card div[style*="width:80px"][style*="height:4px"] { width: 60px !important; }

  /* sessions/rounds rondes-view actions wrappen */
  .round-view { gap: 8px !important; }

  /* sessions/show uitslag winnaar-badge wraps */
  .uitslag-name { flex-wrap: wrap; }
}

/* ───────── 640 px ───────── */
@media (max-width: 640px) {
  /* Page-header titels iets kleiner */
  .page-header h1 { font-size: 28px !important; line-height: 1.15; }
  .hero-title     { font-size: 32px !important; }
  .hero-sub       { font-size: 14px; }

  /* Generieke 1fr 1fr inline-grids → 1 kolom (nieuw-spel min/max, etc.) */
  div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* sessions/show top-card met rondes-cta verticaal */
  .card[style*="justify-content:space-between"] { gap: 10px; }

  /* sessions/rounds tussenstand-rij (48px 1fr 100px) compacter */
  .card > div > div[style*="grid-template-columns:48px 1fr 100px"] {
    grid-template-columns: 36px 1fr 80px !important;
    gap: 8px !important;
  }
  .card > div > div[style*="grid-template-columns:48px 1fr 100px"] .lb-rank {
    font-size: 16px !important;
  }
  .card > div > div[style*="grid-template-columns:48px 1fr 100px"] > div:last-child {
    font-size: 16px !important;
  }

  /* sessions/rounds invoer/edit (1fr 140px) stacken */
  div[style*="grid-template-columns:1fr 140px"] {
    grid-template-columns: 1fr !important;
    gap: 6px !important;
  }
  div[style*="grid-template-columns:1fr 140px"] > input[type="number"] {
    text-align: left !important;
    height: 48px;
    font-size: 18px;
  }

  /* players/show head-to-head krimpt kolommen */
  .card div[style*="grid-template-columns:1fr 36px 36px 52px 32px"] {
    grid-template-columns: 1fr 32px 32px 44px 28px !important;
    gap: 6px !important;
    font-size: 13px;
  }

  /* players/show streaks reuzecijfers kleiner */
  .card div[style*="font-size:48px"] { font-size: 36px !important; }

  /* players/vs versus-header stacken */
  .page-header div[style*="grid-template-columns:1fr auto 1fr"] {
    grid-template-columns: 1fr !important;
    text-align: center;
    gap: 12px !important;
  }
  .page-header div[style*="grid-template-columns:1fr auto 1fr"] > a {
    justify-self: center !important;
    justify-content: center;
  }
  /* Scoreboard wins-cijfers in players/vs kleiner */
  .card div[style*="grid-template-columns:1fr auto 1fr"] div[style*="font-size:72px"] {
    font-size: 48px !important;
  }

  /* players/vs duels-rij (60px 1fr 80px) wat compacter */
  a[style*="grid-template-columns:60px 1fr 80px"] {
    grid-template-columns: 50px 1fr 70px !important;
    gap: 6px !important;
    font-size: 13px;
  }

  /* friends/index fr-row wrap */
  .fr-row { flex-wrap: wrap; gap: 8px; }
  .fr-row > div:last-child { flex-wrap: wrap; }

  /* loans/index loan-row */
  .loan-row { gap: 10px !important; }
  .loan-row > form { flex: 1 1 auto; }
  .loan-row > form > .btn { width: 100%; justify-content: center; }

  /* solo/index per-game score */
  .fr-row > div[style*="text-align:right"] > div[style*="font-size:22px"] {
    font-size: 18px !important;
  }

  /* live/show kleiner padding */
  #lv-card { padding: 14px 16px !important; }
  .lv-name  { font-size: 15px; }
  .lv-score { font-size: 20px; }
  .lv-pos   { font-size: 16px; width: 26px; }

  /* wrapped/user hero + kaarten */
  .wrap-hero { padding: 22px 18px; }
  .wrap-hero-name { font-size: 24px; }
  .wrap-hero-stats { gap: 18px; }
  .wrap-hero-stats .wrap-num { font-size: 26px; }
  .wrap-big { font-size: 20px; }
  .wrap-card { padding: 16px; min-height: 120px; }

  /* welk_spel suggestie-rijen */
  .welkspel-rank { font-size: 24px; width: 28px; }
  .welkspel-img  { width: 52px; height: 52px; }
  .welkspel-card > div { gap: 10px !important; }
  .welkspel-pick, .welkspel-time { padding: 10px 14px; }

  /* profile/show avatar header gap */
  .page-header div[style*="display:flex"][style*="gap:16px"] { gap: 12px; }

  /* groups/show sidebar — flex-rij met rechts uitlijning iets meer ademruimte */
  .card > div[style*="display:flex"][style*="justify-content:space-between"] {
    gap: 8px;
  }

  /* Form action-row onder Opslaan + Annuleren */
  .card > form > div[style*="display:flex"][style*="gap:10px"]:last-child {
    flex-direction: column;
  }
  .card > form > div[style*="display:flex"][style*="gap:10px"]:last-child > .btn,
  .card > form > div[style*="display:flex"][style*="gap:10px"]:last-child > a {
    width: 100%;
    justify-content: center;
  }

  /* sessions/show admin acties: vol-breed */
  .container > div[style*="justify-content:flex-end"][style*="gap:8px"] {
    justify-content: stretch;
    flex-direction: column;
  }
  .container > div[style*="justify-content:flex-end"][style*="gap:8px"] > .btn,
  .container > div[style*="justify-content:flex-end"][style*="gap:8px"] > form,
  .container > div[style*="justify-content:flex-end"][style*="gap:8px"] > form > .btn {
    width: 100%;
    justify-content: center;
  }

  /* Game-picker dropdown niet langer dan halve scherm */
  .game-picker-list { max-height: 50vh; }

  /* Score-row score-input groot, snel typen */
  .score-row > input[type="number"] {
    height: 48px;
    font-size: 18px;
    padding: 10px 14px;
  }

  /* loans/index detail-grid (datum + notitie) stacken */
  details.card form > div[style*="gap:12px"][style*="flex-wrap"] {
    flex-direction: column;
  }
}

/* ───────── 480 px ───────── */
@media (max-width: 480px) {
  .container { padding-left: 12px; padding-right: 12px; }

  /* Titels nog wat kleiner */
  .page-header h1 { font-size: 24px !important; }
  .hero-title     { font-size: 26px !important; }
  .section-h2     { font-size: 22px !important; }

  /* Header-avatars in profile/players */
  .avatar-lg { width: 48px !important; height: 48px !important; font-size: 16px !important; }

  /* groups/show invite-actions stack vol-breed */
  .invite-actions .btn { flex: 1 1 100%; }

  /* groups/show team-rijen (48px 1fr 100px) krijgen smallere kolommen */
  .card div[style*="grid-template-columns:48px 1fr 100px"] {
    grid-template-columns: 32px 1fr 70px !important;
  }

  /* players/show H2H tabel: verberg losses-kolom (W staat al onderaan, percentage zegt genoeg) */
  .card div[style*="grid-template-columns:1fr 36px 36px 52px 32px"] {
    grid-template-columns: 1fr 36px 44px 28px !important;
  }
  .card div[style*="grid-template-columns:1fr 36px 36px 52px 32px"] > :nth-child(3) {
    display: none;
  }

  /* live/show leader-rij */
  .lv-row.lv-leader { padding: 12px 10px; margin: 0 -6px; }
  .lv-name  { font-size: 14px; }
  .lv-score { font-size: 18px; }

  /* hero actions vol-breed */
  .hero-actions { display: flex; flex-direction: column; gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  /* Cards iets compacter */
  .card { padding: 16px; }

  /* Landing feat-grid 1 kol */
  .feat-grid { grid-template-columns: 1fr !important; }
  .feat-card { min-height: 160px; padding: 18px; }

  /* Landing stat-strip */
  .stat-strip { grid-template-columns: 1fr 1fr !important; gap: 8px !important; padding: 14px !important; }

  /* sessions/edit + create team-block */
  .team-block { padding: 12px !important; }

  /* welk_spel chips compacter */
  .welkspel-pick, .welkspel-time { font-size: 13px; padding: 9px 12px; }

  /* wrapped 1 kol */
  .wrap-grid { grid-template-columns: 1fr !important; }
  .wrap-card { min-height: 100px; }
  .wrap-big  { font-size: 18px; }

  /* page-header sub-badges wrap */
  .page-header-sub { flex-wrap: wrap; gap: 6px; }

  /* friend-pick-grid 1 kolom */
  .friend-pick-grid { grid-template-columns: 1fr !important; }

  /* groups/season + show: lb-row al door app.css gehandled */
}

/* ───────── 360 px (echt smal) ───────── */
@media (max-width: 360px) {
  .page-header h1 { font-size: 22px !important; }
  .hero-title     { font-size: 24px !important; }
  .card           { padding: 14px; }
  .lb-row         { font-size: 12px; }
  .invite-actions .btn { font-size: 12px; padding: 8px 10px; }
  .score-row > input[type="number"] { font-size: 16px; height: 44px; }
}
