/* ONE AQUIS figure and Dive button for every IOVO screen (owner Nov 12, frames A1 to A6).
   The standard is the Rep dashboard: the canonical aquis-orb.js drop, 92x106 (drawn x1.1 by the shared zoom), on the
   bottom right corner 14px from both edges, its small status dot, no word under it, and the round Dive button
   (30px, x1.1) on the drop's right shoulder. This file is the only place that size, place and look are written.
   Hosts: Rep and Office #aquis-mini-trigger, the CEO anchor #aquis, the older Office pages' .aquis-fab and the
   non interactive staff mark .iovo-rep-aquis-mark. Each host keeps its own click, keyboard and chat behaviour. */
html:root { --aquis-std-accent:#3ee6d3; --aquis-std-fill:#052238; --aquis-std-line:rgba(160,220,240,.22); --aquis-std-ring:rgba(5,34,56,.88); --aquis-std-glow:rgba(62,230,211,.12); --aquis-std-filter:none; }
html:root[data-theme="light"] { --aquis-std-accent:#0a6f7a; --aquis-std-fill:#fff; --aquis-std-line:rgba(10,38,56,.16); --aquis-std-ring:rgba(255,255,255,.96); --aquis-std-glow:color-mix(in srgb,#0a6f7a 14%,transparent); --aquis-std-filter:none; }
html:root[data-theme="dark"] { --aquis-std-accent:#f47920; --aquis-std-fill:#120803; --aquis-std-line:rgba(255,197,138,.18); --aquis-std-ring:rgba(18,8,3,.94); --aquis-std-glow:color-mix(in srgb,#f47920 14%,transparent); --aquis-std-filter:none; }

/* The figure box. */
html:root:root body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab, .iovo-rep-aquis-mark):not(#_) {
  box-sizing: border-box; width: 92px !important; height: 106px !important; min-width: 0 !important; min-height: 0 !important;
  padding: 0 !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: none !important; box-shadow: none !important; filter: none !important; clip-path: none !important; overflow: visible !important;
}
html:root:root body :is(#aquis[data-aquis-mark], .aquis-dock .aquis-fab):not(#_) { position: relative; display: block !important; pointer-events: auto !important; cursor: pointer; }
/* Rep pages keep their own corner shell (it already sits 14px from the corner and moves above Field Mode's bar).
   Everywhere else the figure itself takes that corner. */
html:root:root:not([data-iovo-rep]) body :is(#aquis-mini-trigger, #aquis[data-aquis-mark]):not(#_) {
  position: fixed !important; left: auto !important; top: auto !important; right: 14px !important; bottom: calc(14px + env(safe-area-inset-bottom, 0px)) !important;
}
html:root:root:not([data-iovo-rep]) body #aquis-mini-trigger:not(#_) { z-index: 2147481000; }
@media (min-width: 641px) { html:root:root body #aquis-dock.aquis-dock:not(#_) { inset-block-end: calc(14px + env(safe-area-inset-bottom, 0px)); inset-inline-end: 14px; } }
html:root:root body .aquis-dock .aquis-fab:not(#_) > :not(.orb-cv):has(.orb-cv) { position: static !important; display: block; width: auto; height: auto; }

/* The drop itself: never clipped, and colored exactly as on the Rep dashboard. */
html:root:root body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab, .iovo-rep-aquis-mark):not(#_) .orb-cv {
  position: absolute !important; left: 50% !important; right: auto !important; top: auto !important; bottom: 0 !important;
  width: 92px !important; height: 106px !important; max-width: none !important; margin: 0 !important; zoom: 1.1;
  transform: translateX(-50%); clip-path: none !important; display: block !important; visibility: visible !important; pointer-events: none;
  transition: transform .3s ease;
}
html:root:root[data-theme] body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab, .iovo-rep-aquis-mark):not(#_) .orb-cv { filter: var(--aquis-std-filter) !important; }
html:root:root body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab):not(#_):is(:hover, :focus-visible) .orb-cv { transform: translateX(-50%) translateY(-2px) scale(1.04); }
html:root:root body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab):not(#_):focus-visible { outline: 2px solid var(--aquis-std-accent) !important; outline-offset: 4px; border-radius: 18px !important; }
@media (prefers-reduced-motion: reduce) { html:root:root body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab):not(#_) .orb-cv { transition: none; } }
/* No word under the drop (owner: "it says aquas underneath"). Screen readers keep each host's own label. */
html:root:root body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab):not(#_) > .orb-name { display: none !important; }
/* The small status dot at the drop's lower right. Rep and Office draw it as .aquis-mini-state-dot (it also turns red on
   an error); the CEO anchor and the older Office button get the same dot drawn here. */
html:root:root body #aquis-mini-trigger:not(#_) > .aquis-mini-state-dot,
html:root:root body :is(#aquis[data-aquis-mark], .aquis-dock .aquis-fab):not(#_)::after {
  content: ''; display: block !important; visibility: visible !important; position: absolute; right: 5px; bottom: 6px; width: 8px; height: 8px;
  border-radius: 999px; background: var(--aquis-std-accent); box-shadow: 0 0 0 2px var(--aquis-std-ring), 0 0 12px rgba(77,217,192,.16); opacity: .74; z-index: 3; pointer-events: none;
}
html:root:root body .aquis-mini-shell.error #aquis-mini-trigger:not(#_) > .aquis-mini-state-dot { background: #ff6b6b; }
@media (max-width: 700px) {
  html:root:root body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab, .iovo-rep-aquis-mark):not(#_),
  html:root:root body :is(#aquis-mini-trigger, #aquis[data-aquis-mark], .aquis-dock .aquis-fab, .iovo-rep-aquis-mark):not(#_) .orb-cv { width: 70px !important; height: 81px !important; }
}
@media (max-width: 640px) {
  html:root:root:not([data-iovo-rep]) body :is(#aquis-mini-trigger, #aquis[data-aquis-mark]):not(#_) { right: 10px !important; bottom: calc(10px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* The Dive button: the Rep's round white (Day) / navy (Aqua) / black (Night) button on the drop's right shoulder.
   Where each screen shows or hides it, and which game it opens, stays with that screen. */
html:root:root body :is(.iovo-sea-dive-btn, #ceo-dive):not(#_) {
  box-sizing: border-box; display: grid; place-items: center; width: 28px !important; height: 28px !important; min-width: 0 !important; min-height: 0 !important;
  padding: 0 !important; margin: 0 !important; border-radius: 50% !important; border: 1px solid var(--aquis-std-line) !important;
  background: var(--aquis-std-fill) !important; color: var(--aquis-std-accent) !important; box-shadow: 0 4px 16px var(--aquis-std-glow) !important;
  opacity: 1 !important; zoom: 1.1; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  position: fixed !important; left: auto !important; top: auto !important; right: 9.09px !important; bottom: calc(96.36px + env(safe-area-inset-bottom, 0px)) !important;
}
html:root:root body :is(.iovo-sea-dive-btn, #ceo-dive):not(#_):is(:hover, :focus-visible) { border-color: var(--aquis-std-accent) !important; }
html:root:root body #ceo-dive:not(#_)[aria-pressed="true"] { background: var(--aquis-std-accent) !important; color: var(--aquis-std-fill) !important; }
html:root:root body #ceo-dive:not(#_) > span { display: none !important; }
html:root:root body #ceo-dive:not(#_) .ic { width: 15px; height: 15px; --ic-size: 15px; }
/* Lengths below are before the x1.1 zoom. Wide screens: on the drop's right shoulder. Phones: directly above the
   compact drop, inside the screen. Rep pages lift their figure 82px above the bottom tabs at 768px and under. */
@media (min-width: 701px) {
  html:root:root body :is(.iovo-sea-dive-btn, #ceo-dive):not(#_) { width: 30px !important; height: 30px !important; }
}
@media (min-width: 701px) and (max-width: 768px) {
  html:root:root[data-iovo-rep] body :is(.iovo-sea-dive-btn, #ceo-dive):not(#_) { bottom: calc(156.8px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (max-width: 700px) {
  html:root:root body :is(.iovo-sea-dive-btn, #ceo-dive):not(#_) { right: 8px !important; bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important; width: 24px !important; height: 24px !important; }
  html:root:root[data-iovo-rep] body :is(.iovo-sea-dive-btn, #ceo-dive):not(#_) { right: 8px !important; bottom: calc(114px + env(safe-area-inset-bottom, 0px)) !important; }
}
@media (max-width: 640px) {
  html:root:root:not([data-iovo-rep]) body :is(.iovo-sea-dive-btn, #ceo-dive):not(#_) { bottom: calc(64px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* Office: canvas unavailable shows an accessible word, never retired artwork. */
html:root:root body :is([data-platform-aquis-mark],[data-platform-aquis-fallback]):focus-visible { outline: 2px solid var(--aquis-std-accent) !important; outline-offset: 2px; border-radius: 16px !important; }
html body:has([data-platform-aquis-mark]) :is(.iom-aquis-fx,.iom-wave,.iom-think) { display: none !important; }
/* Hide the complete subtree: child visibility rules must never leak over native overlays. */
html[data-iovo-game-open] body :is([data-platform-aquis-mark],[data-platform-aquis-dive]),
html body:has(dialog[open], [data-drawer-open="true"], .tb-mapx) :is([data-platform-aquis-mark],[data-platform-aquis-dive]) { display: none !important; }
html:root:root body [data-platform-aquis-fallback] { pointer-events: auto !important; background-image: none !important; }
html:root:root body [data-platform-aquis-fallback] > * { display: none !important; }
html:root:root body [data-platform-aquis-fallback]::after { content: 'AQUIS' !important; display: block !important; font: 700 11px/1.3 sans-serif; color: var(--aquis-std-accent); }
