/* Mobile overlays: expose controls and keep floating panels inside the viewport. */
@media (max-width: 800px) {
  .eh9-compare-tray.is-minimized {
    left: max(12px, env(safe-area-inset-left)) !important;
    right: auto !important;
    transform: none !important;
    width: max-content !important;
    max-width: calc(100vw - 24px) !important;
    box-sizing: border-box !important;
  }

  [data-ehqc] .ehqc-panel:not([hidden]),
  .ehqc .ehqc-panel:not([hidden]) {
    position: fixed !important;
    z-index: 20000 !important;
    inset: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding-top: env(safe-area-inset-top) !important;
    padding-right: env(safe-area-inset-right) !important;
    padding-bottom: env(safe-area-inset-bottom) !important;
    padding-left: env(safe-area-inset-left) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  [data-ehqc] .ehqc-panel > header,
  .ehqc .ehqc-panel > header {
    position: sticky !important;
    top: 0 !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-height: 64px !important;
    padding: 10px 12px !important;
    background: #fff !important;
    border-bottom: 1px solid #e2e5e9 !important;
    box-sizing: border-box !important;
  }

  [data-ehqc] .ehqc-panel > header h1,
  [data-ehqc] .ehqc-panel > header h2,
  .ehqc .ehqc-panel > header h1,
  .ehqc .ehqc-panel > header h2 {
    min-width: 0 !important;
    margin: 0 !important;
    font-size: 18px !important;
    line-height: 1.25 !important;
  }

  [data-ehqc] .ehqc-window-actions,
  .ehqc .ehqc-window-actions {
    display: flex !important;
    flex: 0 0 auto !important;
    align-items: center !important;
    gap: 8px !important;
  }

  [data-ehqc] .ehqc-minimize,
  [data-ehqc] .ehqc-close,
  .ehqc .ehqc-minimize,
  .ehqc .ehqc-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 46px !important;
    min-height: 46px !important;
    padding: 0 12px !important;
    border: 1px solid #d5dbe3 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #a81031 !important;
    font: inherit !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: nowrap !important;
    cursor: pointer !important;
  }

  .eh9-compare-tray.is-minimized .eh9-compare-minimize {
    min-height: 46px !important;
  }
}

.eh-auth-mobile-return {
  display: block;
  margin: 0 0 18px;
}
.eh-auth-mobile-return a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid #a81031;
  border-radius: 8px;
  color: #a81031;
  font-weight: 700;
  text-decoration: none;
}
.eh-auth-mobile-return a:focus-visible { outline: 3px solid #a8103166; outline-offset: 2px; }
