/* EOFFER249: mobile chat owns the viewport; the chat-invoked GEO picker is the only exception.
   Reuses existing html.eoffer-chat-modal-open and body.eoffer-chat-geo-select states.
   Does not change GEO cookies, URL navigation, the chat transcript, or desktop layout. */
@media (max-width: 768px) {
  /* The active chat must outrank the sticky header and automatic GEO confirmation. */
  html.eoffer-chat-modal-open body:not(.eoffer-chat-geo-select) .eoffer-chat {
    z-index: 2147483000 !important;
  }
  html.eoffer-chat-modal-open body:not(.eoffer-chat-geo-select) .eoffer-chat__panel:not([hidden]) {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  /* Keep the GEO question unresolved, but invisible while the chat occupies the viewport. */
  html.eoffer-chat-modal-open body:not(.eoffer-chat-geo-select) [data-geo-confirm] {
    visibility: hidden !important;
    pointer-events: none !important;
  }
  /* When "Choose city" is pressed IN the chat, hand control to the existing GEO modal. */
  html.eoffer-chat-modal-open body.eoffer-chat-geo-select .eoffer-chat {
    z-index: 1 !important;
  }
  html.eoffer-chat-modal-open body.eoffer-chat-geo-select [data-geo-modal]:not([hidden]) {
    z-index: 2147483000 !important;
  }
}
