
/* EarthWatch touch-usability pass. User report: the GDACS filter toggle
   (js/ew734-gdacs-controls.js's #ewGdacsToggle) and the major-event
   popup's close button were hard to tap reliably on iPad Chrome.

   Root cause for #ewGdacsToggle: touch-action was never set on it or its
   container (#hazardLayersPanel), unlike #majorAlert which already has
   touch-action:manipulation applied to itself and every descendant
   (inline-2.css). Without it, the browser can spend time disambiguating
   a single tap from a double-tap-zoom or pan/scroll gesture before
   committing to a click -- exactly what "hard to interact with" on a
   touchscreen feels like. #majorAlert's own close/dismiss buttons
   (js/inline-804.js) already had BOTH touch-action AND a redundant
   pointerup handler alongside onclick, yet were still reported as
   difficult -- so for those the more likely factor is sheer touch-target
   size, well under Apple's 44x44pt minimum recommendation. Both causes
   are addressed globally here rather than only for the two reported
   elements, per the request to pass over every button/dialog. Loads
   last, so it wins any width/height cascade fight the same way every
   other shell-stage file in this project has. */

/* 1) touch-action everywhere a tap should register immediately: every
   button app-wide, plus every overlay dialog/panel and its descendants
   (mirrors the #majorAlert pattern that was already proven to help). */
button,
.ewRailBtn,
.hazardButtons button,
.regionButtons button,
.operationsButtons button{
  touch-action:manipulation;
}
#alertPane,#alertPane *,
#majorAlert,#majorAlert *,
#dataHealthPanel,#dataHealthPanel *,
#coveragePanel,#coveragePanel *,
#locationsPanel,#locationsPanel *,
#regionPanel,#regionPanel *,
#hazardLayersPanel,#hazardLayersPanel *,
#locationModal,#locationModal *,
#ewEventChooser,#ewEventChooser *,
#analysisPanel,#analysisPanel *,
#ewAnalysis,#ewAnalysis *,
#alertCentre,#alertCentre *,
#ewReplay,#ewReplay *,
#ewSimModal,#ewSimModal *{
  touch-action:manipulation;
}

/* 2) Bump undersized close/toggle controls up toward the ~44x44px
   minimum touch target, without changing their visual glyph size or
   breaking the header rows they sit in (all of these are flex/grid
   items already, so a modest size increase just needs a touch more
   room, not a layout rewrite). */
#locationsPanelClose,#regionPanelClose,#hazardLayersPanelClose{
  width:36px!important;height:36px!important;
}
#alertPane .paneClose{
  width:40px!important;height:40px!important;min-width:40px!important;
}
.dhClose{
  height:34px!important;min-width:34px!important;padding:0 10px!important;
}
#maClose{
  width:40px!important;height:40px!important;
}

/* 3) The GDACS toggle specifically: give it the same comfortable
   minimum height as its sibling hazard buttons already have (32px is
   the shared .hazardButtons button height; this only guards against any
   future override shrinking it back down) plus an explicit larger hit
   area via padding, matching the close-button bumps above in spirit. */
#ewGdacsToggle{
  min-height:36px!important;
  touch-action:manipulation;
}
