/* DIGI HAM LINK — network chooser 3-column layout with P25, v2.4.
 * Frontend-only. Overrides legacy v9.2 2-column CSS and the P25 v2 full-row
 * D-STAR rule. Does not change application events, sessions, or PTT. */
@media (min-width: 961px) {
  html body #view-radio #networkChoices,
  html body #view-radio div#networkChoices {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: row !important;
    gap: 8px !important;
    align-items: stretch !important;
    min-width: 0 !important;
  }
  html body #view-radio #networkChoices > button,
  html body #view-radio #networkChoices > #dhlP25LabOpen.dhlP25LabBtn {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    grid-column: auto !important;
    min-height: 62px !important;
  }
  /* Supersede P25 v2's rule making D-STAR a full-width extra row. */
  html body #view-radio #networkChoices:has(#dhlP25LabOpen:not([hidden])) > button[data-dhl-v92-kind="dstar"],
  html body #view-radio #networkChoices:has(#dhlP25LabOpen:not([hidden])) > button[data-dhl-v9-kind="dstar"],
  html body #view-radio #networkChoices > button[data-dhl-v92-kind="dstar"],
  html body #view-radio #networkChoices > button[data-dhl-v9-kind="dstar"] {
    grid-column: auto !important;
    order: 9999 !important;
  }
  html body #view-radio #networkChoices > #dhlP25LabOpen { order: 8 !important; }
  html body #view-radio #networkChoices > button.dhlTileV92 .dhlTileV92Title,
  html body #view-radio #networkChoices > button.dhlTileV9 .dhlTileV9Title {
    font-size: 14px !important;
  }
  html body #view-radio #networkChoices > button.dhlTileV92 .dhlTileV92Sub,
  html body #view-radio #networkChoices > button.dhlTileV9 .dhlTileV9Sub {
    font-size: 10px !important;
  }
  html body #view-radio #networkChoices > #dhlP25LabOpen.dhlP25LabBtn {
    padding: 8px 10px !important;
    gap: 8px !important;
  }
  html body #view-radio #networkChoices > #dhlP25LabOpen .dhlP25Text strong {
    font-size: 14px !important;
  }
  html body #view-radio #networkChoices > #dhlP25LabOpen .dhlP25Text small {
    font-size: 10px !important;
  }
}
/* Narrower screens use two columns to avoid clipping controls and labels. */
@media (max-width: 960px) {
  html body #view-radio #networkChoices { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  html body #view-radio #networkChoices:has(#dhlP25LabOpen:not([hidden])) > button[data-dhl-v92-kind="dstar"],
  html body #view-radio #networkChoices:has(#dhlP25LabOpen:not([hidden])) > button[data-dhl-v9-kind="dstar"] {
    grid-column: auto !important; order: 9999 !important;
  }
}
@media (max-width: 380px) {
  html body #view-radio #networkChoices { grid-template-columns: minmax(0, 1fr) !important; }
}
