/*
 * touch-coarse.css
 * Loaded last on both calc.html (player) and gm.html.
 * All rules are scoped to touch/pointer-coarse devices so desktop is unaffected.
 */

@media (pointer: coarse) {

  /* ------------------------------------------------------------------ */
  /* --- cs-base.css overrides (player page) --------------------------- */
  /* ------------------------------------------------------------------ */

  /* .btn is already min-height 40px; bump to 44px for tap comfort */
  .btn {
    min-height: 44px;
  }

  /* ------------------------------------------------------------------ */
  /* --- cs-clock.css overrides (player page) -------------------------- */
  /* ------------------------------------------------------------------ */

  /* .clock-new-round-btn: padding 5px 14px + font 0.82rem -> ~26px */
  .clock-new-round-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .clock-time-btn: inherits .btn min-height, but font 0.62rem is very small;
     keep font as-is (already overriding via .btn 44px above), just ensure padding */
  .clock-time-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* .clock-turn-complete-btn: padding 4px 8px + font 0.64rem -> ~19px */
  .clock-turn-complete-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* ------------------------------------------------------------------ */
  /* --- gm-clock.css overrides (GM page) ------------------------------ */
  /* ------------------------------------------------------------------ */

  /* Base button on GM page: padding 7px 10px -> ~31px; bump to 44px.
     Scoped to body.gm-page so the player sheet's dense inline buttons
     (coin steppers, dashboard +/- controls) keep their compact layout. */
  body.gm-page button {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* .gm-link-btn: padding 6px 10px -> ~27px */
  .gm-link-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-clock-new-round-btn: padding 6px 12px + font 0.78rem -> ~26px */
  .gm-clock-new-round-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-clock-time-btn: padding 5px 10px + font 0.7rem -> ~23px */
  .gm-clock-time-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-clock-sync-btn: padding 5px 9px + font 0.68rem -> ~22px */
  .gm-clock-sync-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* .gm-clock-history-filter-btn: padding 4px 8px + font 0.64rem -> ~21px */
  .gm-clock-history-filter-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-clock-history-delete-btn: padding 3px 6px + font 0.62rem -> ~18px */
  .gm-clock-history-delete-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-clock-history-edit-btn / save / cancel: padding 4px 7px + font 0.64rem -> ~20px */
  .gm-clock-history-edit-btn,
  .gm-clock-history-save-btn,
  .gm-clock-history-cancel-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* ------------------------------------------------------------------ */
  /* --- gm-sheets.css overrides (GM page) ----------------------------- */
  /* ------------------------------------------------------------------ */

  /* .gm-entity-filter-btn: padding 6px 12px + font 0.72rem -> ~26px, interactive toggle */
  .gm-entity-filter-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-quick-status-btn: padding 5px 9px + font 0.74rem -> ~24px */
  .gm-quick-status-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-settings-tab: padding 5px 11px + font 0.95rem -> ~28px
     (already gets 44px at <=640px via gm-npc.css; ensure it also applies at coarse pointer) */
  .gm-settings-tab {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* .gm-summary-recovery-btn: min-height 36px, needs 44px */
  .gm-summary-recovery-btn {
    min-height: 44px;
  }

  /* .gm-card-menu > summary: padding 6px 8px + font 0.78rem -> ~27px, interactive toggle */
  .gm-card-menu > summary,
  .gm-card-section > summary {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
  }

  /* .gm-control-details-summary: padding 6px 8px -> ~27px */
  .gm-control-details-summary {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* .gm-comms-history > summary: cursor pointer, font 0.78rem -> ~26px */
  .gm-comms-history > summary {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
  }

  /* ------------------------------------------------------------------ */
  /* --- gm-messages.css overrides (GM page) --------------------------- */
  /* ------------------------------------------------------------------ */

  /* .gm-delete-message-btn: padding 3px 7px + font 0.67rem -> ~20px */
  .gm-delete-message-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-message-history summary: cursor pointer, font 0.74rem -> ~26px */
  .gm-message-history summary {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
  }

  /* .gm-wound-toggle is a button-style toggle: inherits button rule above */

  /* ------------------------------------------------------------------ */
  /* --- gm-npc.css overrides (GM page) -------------------------------- */
  /* ------------------------------------------------------------------ */

  /* .gm-attendance-toggle: padding 4px 10px + font 0.72rem -> ~22px, interactive */
  .gm-attendance-toggle {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-player-actions button: padding 4px 8px + font 0.75rem -> ~22px */
  .gm-player-actions button {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* .gm-npc-actions button, .gm-npc-template-actions-row button: padding 4px 8px + font 0.72rem -> ~22px */
  .gm-npc-actions button,
  .gm-npc-template-actions-row button {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* ------------------------------------------------------------------ */
  /* --- gm-damage.css overrides (GM page) ----------------------------- */
  /* ------------------------------------------------------------------ */

  /* .gm-toggle-btn: padding 4px 10px + font 0.8rem -> ~23px */
  .gm-toggle-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-damage-target-mode-btn: padding 5px 10px + font 0.74rem -> ~24px
     (already gets 42px at 721-900px; override to 44px for all coarse-pointer) */
  .gm-damage-target-mode-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* .gm-damage-stepper-btn: min-height 34px (gets 42px at 721-900px; ensure 44px) */
  .gm-damage-stepper-btn {
    min-height: 44px;
  }

  /* .gm-damage-player-btn: padding 5px 9px + font 0.9rem -> ~29px */
  .gm-damage-player-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* .gm-market-tab-btn: padding 6px 14px 8px + font 0.75rem -> ~27px */
  .gm-market-tab-btn {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
  }

  /* ------------------------------------------------------------------ */
  /* --- GOAL 2: Font size ≥ 16px on primary typing inputs ------------- */
  /* Prevents iOS Safari from auto-zooming on focus.                     */
  /* Dense numeric grids (weapon cards, skills tables) are NOT touched.  */
  /* ------------------------------------------------------------------ */

  /* --- cs-health.css overrides --------------------------------------- */

  /* Injury amount/reason inputs in the HP injury control row */
  .hp-injury-controls .weapon-detail-input {
    font-size: 16px;
  }

  /* Editable reason field inside each HP history entry */
  .hp-history-reason input {
    font-size: 16px;
  }

  /* --- cs-coins.css overrides ---------------------------------------- */

  /* Inline deposit/withdraw reason field */
  .inline-reason-input {
    font-size: 16px;
    min-width: 0; /* allow shrink in flex row */
  }

  /* Compact reason input in the secondary purse transaction form */
  .reason-input.compact {
    font-size: 16px;
  }

  /* Editable reason field inside coin history entries */
  .history-reason input {
    font-size: 16px;
  }

  /* --- cs-clock.css overrides ---------------------------------------- */

  /* Player note textarea in the clock panel */
  .clock-player-note-input {
    font-size: 16px;
  }

  /* Session connect / room-code input in the sync modal */
  .sync-connect-field input {
    font-size: 16px;
  }

  /* --- cs-market.css overrides --------------------------------------- */

  /* Global search bar on the market panel */
  .market-filter-bar input[type="text"] {
    font-size: 16px;
    min-width: 0;
  }

  /* Per-section search filter inside each market category */
  .market-section-controls input[type="text"] {
    font-size: 16px;
    min-width: 0;
  }

  /* --- gm-clock.css / gm-messages.css overrides (GM page) ----------- */

  /* GM message compose input */
  .gm-message-input {
    font-size: 16px;
    min-width: 0;
  }

  /* GM note input (wound/session notes) */
  .gm-note-input {
    font-size: 16px;
    min-width: 0;
  }

  /* GM wound reason input */
  .gm-wound-reason {
    font-size: 16px;
    min-width: 0;
  }

} /* end @media (pointer: coarse) */
