/* M29-B: hero hotspot geometry (P0-05).
   Only the hotspot / hero-popover section belongs to m29-home.
   Drawer, sticky bars, breadcrumb and search rules live in m29-chrome's
   02-drawer-portal-fix.css / 05 / 06 files — do not duplicate them here. */

/* P0-05: Pin geometry is locked at EVERY breakpoint. A global
   `html body button { min-height:44px !important }` rule in main.bundle.css
   used to stretch these pins to 28x44 at 1440 (oval "0"). Every dimension
   axis is pinned with !important so neither that rule nor any media query
   can squash them. This also survives the static carrier where main.bundle
   may be missing — the lock is self-contained in this file. */
/* Specificity matters: urgent-click-fix.css sets 44px with
   `html body .fy3-hotspot !important`, and index.html has an inline
   `html body button:not(.skip-link){min-height:44px!important}`. The
   `html body ... :not(.skip-link)` prefixes below outrank both. */
html body button.fy3-hotspot:not(.skip-link),
html body .fy3-hotspot,
html body .hero-hotspot,
html body button[class*="hotspot"]:not(.skip-link) {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  flex: 0 0 28px !important;
  padding: 0 !important;
  aspect-ratio: 1 / 1 !important;
  border-radius: 50% !important;
  box-sizing: border-box !important;
  flex-shrink: 0 !important;
  margin: -14px 0 0 -14px !important;
  overflow: visible !important;
}
/* Visible dot fills the whole 28px pin (guard against urgent's inset:9px). */
html body .fy3-hotspot__dot, html body .hero-hotspot__dot {
  width: 28px !important; height: 28px !important;
  min-width: 28px !important; min-height: 28px !important;
  max-width: 28px !important; max-height: 28px !important;
  inset: 0 !important;
}

/* Self-contained desktop/static height caps for hero-only oversize elements.
   extra height from other sections belongs to their owning agents. */
html body .fy3-hotspot__win { max-height: 220px !important; overflow: hidden !important; }
html body .fy3-compare, html body .fy3-compare__plate, html body .fy3-compare__range { max-height: 720px !important; }

/* P0-05: mobile hotspot popover becomes a bottom-fixed light float card.
   It used to be absolutely positioned inside the hero media box (height
   clamp 180-260px) and got cut in half by the media overflow:hidden.
   Fix it to the viewport bottom so it is never clipped, with full text. */
@media (max-width: 767px) {
  html body .fy3-hotspot__win,
  html body .fy3-hotspot-card,
  html body .hotspot-popover,
  html body [class*="hotspot-pop"] {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
    width: auto !important;
    max-width: none !important;
    max-height: min(60vh, 320px) !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 9000 !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    box-shadow: 0 12px 32px -12px rgba(20, 19, 17, 0.45) !important;
  }
  html body .fy3-hotspot__win img,
  html body .fy3-hotspot-card img {
    height: 120px !important;
    object-fit: cover !important;
  }
  /* Portaled to <body> by 01-hero.js: the base `.is-open` descendant rule no
     longer applies, so keep the card explicitly visible while portaled. */
  html body .fy3-hotspot__win.is-portaled {
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }

  /* M29M-B ①-b · 390 真机实测（2026-11-30）：
     - 卡片被 `<style>` 里 critical-header.css 实体化后的
       `html body .fy3-hotspot__win { inset-inline-start:auto; inset-inline-end:8px;
       max-width:min(148px, ...) }` 抢走 left/right/max-width，只剩 148px 贴在右缘
       —— 点左侧热点时卡片远端、点右侧热点时底部被 56px 底栏 + 52px 绿钮压住。
     - 该 `<style>` 在文档里比本文件晚出现（~705 行），同权重 !important 归它赢。
     → 用 `.is-portaled`（原来就有的门户态类）+ 元素选择器抬高特异性，
       把卡片真正锁成视口底部轻浮卡：left 12 / right 12（390 下宽 366）、
       bottom 抬到 01/02/03 tab 条（672~716）与 52px 绿钮（top 716）之上。
     - z-index 9600 > 绿钮 3600、tab 条与热点 pin（hero 内 z:3），
       热点/底栏都不得压在卡片上；内容超高时卡内滚动，仍 fully in view。 */
  html body .fy3-hotspot__win.is-portaled {
    position: fixed !important;
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: calc(184px + env(safe-area-inset-bottom, 0px)) !important;
    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: min(44vh, 300px) !important;
    margin: 0 !important;
    transform: none !important;
    z-index: 9600 !important;
    overflow: auto !important;
    -webkit-overflow-scrolling: touch !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: var(--fy-bg-primary, #fff) !important;
    border: 1px solid var(--fy-rule, #E6E2DC) !important;
    border-radius: 14px !important;
    box-shadow: 0 18px 44px -14px rgba(20, 19, 17, 0.42) !important;
  }
  html body .fy3-hotspot__win.is-portaled img {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: 168px !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    border-radius: 10px 10px 0 0 !important;
  }
  html body .fy3-hotspot__win.is-portaled .fy3-hotspot__cap {
    padding: 8px 10px 10px !important;
  }
}
