@import url("../icons/iovo-icons.css");
/* IOVO living sea: the sea layer, its still fallback, the theme + effect picker and the Dive button.
   Shared by every page that loads app/shared/iovo-sea/iovo-sea.js. Colors come from the page tokens when present
   (--c-primary, --c-text-*, --c-hairline-strong), with safe fallbacks. */

/* ---------- the sea layer: fixed behind everything, never takes pointer events ---------- */
.iovo-sea-canvas, .iovo-sea-still {
  position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: -1;
  display: block; pointer-events: none; user-select: none;
}
/* The page background is painted by the sea while it runs (the root keeps its solid color underneath). */
html[data-sea="on"] body, html[data-sea="fallback"] body { background: transparent !important; }

/* WebGL unavailable (or a software renderer): a calm still gradient in the theme colors. */
.iovo-sea-still {
  background:
    radial-gradient(900px 520px at 22% 108%, rgba(46, 232, 255, .16), transparent 62%),
    radial-gradient(1100px 640px at 80% -12%, rgba(127, 252, 240, .14), transparent 60%),
    linear-gradient(180deg, #0b4a63 0%, #052238 45%, #03101d 100%);
}
html[data-theme="dark"] .iovo-sea-still {
  background:
    radial-gradient(900px 520px at 24% 110%, rgba(244, 121, 32, .14), transparent 62%),
    radial-gradient(1000px 600px at 82% -14%, rgba(244, 121, 32, .10), transparent 60%),
    linear-gradient(180deg, #120803 0%, #050201 50%, #000 100%);
}
html[data-theme="light"] .iovo-sea-still {
  background:
    radial-gradient(900px 520px at 22% 108%, rgba(92, 198, 220, .22), transparent 62%),
    radial-gradient(1100px 650px at 80% -12%, #e3f3f8 0%, transparent 60%),
    linear-gradient(180deg, #ffffff 0%, #eef8fb 55%, #d9eef4 100%);
}

/* ---------- picker: Apple-glass, 3 theme icons + Water / Network ---------- */
.iovo-sea-picker {
  --sea-ink: var(--c-text-2, var(--text-2, rgba(220, 236, 244, .78)));
  --sea-ink-hi: var(--c-text-1, var(--text-1, #effcff));
  --sea-accent: var(--c-primary, var(--primary, #3ee6d3));
  --sea-accent-ink: var(--c-primary-ink, #022027);
  --sea-line: var(--c-hairline-strong, var(--hairline-strong, rgba(160, 220, 240, .22)));
  display: inline-flex; align-items: center; gap: 6px; flex: none; min-width: 210px; min-height: 36px;
}
.iovo-sea-seg {
  display: inline-flex; align-items: center; gap: 3px; padding: 3px; border-radius: 999px;
  box-sizing: border-box;
  border: 1px solid var(--sea-line);
  background: color-mix(in srgb, var(--sea-ink-hi) 6%, transparent);
  -webkit-backdrop-filter: saturate(170%) blur(18px); backdrop-filter: saturate(170%) blur(18px);
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 9%, transparent);
}
.iovo-sea-opt {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 28px; min-height: 28px; margin: 0; padding: 0; border: 0; border-radius: 999px;
  box-sizing: border-box;
  background: transparent; color: var(--sea-ink); font: 600 12.5px/1 var(--font-ui, system-ui, sans-serif);
  cursor: pointer; transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.iovo-sea-opt--icon { width: 28px; }
.iovo-sea-opt--text { padding: 0 10px; white-space: nowrap; }
.iovo-sea-opt:hover { color: var(--sea-ink-hi); background: color-mix(in srgb, var(--sea-ink-hi) 8%, transparent); }
.iovo-sea-opt:focus-visible { outline: 2px solid var(--sea-accent); outline-offset: 1px; }
.iovo-sea-opt[aria-pressed="true"] {
  background: var(--sea-accent); color: var(--sea-accent-ink);
  box-shadow: 0 0 10px color-mix(in srgb, var(--sea-accent) 34%, transparent);
}
html[data-theme="light"] .iovo-sea-opt[aria-pressed="true"] {
  color: #ffffff;
  box-shadow: 0 1px 4px rgba(8, 127, 140, .24);
}
.iovo-sea-ico { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ic.iovo-sea-ico { --ic-size: 15px; }
.iovo-sea-ico--fx { width: 15px; height: 15px; display: none; }
/* Match the Office header's compact button widths through 1600px. */
@media (max-width: 1600px) {
  .iovo-sea-picker { min-width: 0; }
  .iovo-sea-opt--text { width: 32px; padding: 0; }
  .iovo-sea-opt__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .iovo-sea-ico--fx { display: block; }
}
@media (max-width: 640px) {
  /* Phones retain both effect controls: a rep must not need another device to change them. */
  .iovo-sea-picker { gap: 4px; flex: none; }
  .iovo-sea-seg { padding: 3px; gap: 2px; }
  .iovo-sea-seg--fx { display: inline-flex; }
  .iovo-sea-opt { height: 24px; min-height: 24px; }
  .iovo-sea-opt--icon, .iovo-sea-opt--text { width: 24px; }
  .iovo-sea-ico { width: 15px; height: 15px; }
  .ic.iovo-sea-ico { --ic-size: 14px; }
}

/* ---------- Dive: a small glass button snugly on AQUIS's top-right 1-o'clock shoulder ---------- */
.iovo-sea-dive-btn {
  position: fixed; right: 10px; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 2147481400;
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; margin: 0;
  border-radius: 50%; border: 1px solid var(--c-hairline-strong, rgba(160, 220, 240, .26));
  background: color-mix(in srgb, var(--c-surface-1, #071c2e) 70%, transparent);
  -webkit-backdrop-filter: saturate(170%) blur(14px); backdrop-filter: saturate(170%) blur(14px);
  color: var(--c-primary, #3ee6d3); cursor: pointer; opacity: .62;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: opacity .2s ease, transform .2s ease;
}
.iovo-sea-dive-btn::after {
  content: ""; position: absolute; inset: -10px; border-radius: 50%;
}
.iovo-sea-dive-btn:hover, .iovo-sea-dive-btn:focus-visible { opacity: 1; transform: translateY(-1px); }
.iovo-sea-dive-btn:focus-visible { outline: 2px solid var(--c-primary, #3ee6d3); outline-offset: 2px; }
.iovo-sea-dive-btn .iovo-sea-ico { width: 15px; height: 15px; }
html[data-aquis-dock="open"] .iovo-sea-dive-btn, html[data-sea-dive] .iovo-sea-dive-btn, html[data-sea-game] .iovo-sea-dive-btn, .iovo-sea-dive-btn[data-dive-waiting="1"] { visibility: hidden !important; opacity: 0 !important; pointer-events: none !important; }
@media print { .iovo-sea-canvas, .iovo-sea-still, .iovo-sea-dive-btn { display: none !important; } }

/* The shared AQUIS orb (aquis-orb.js) inside the Office AQUIS button: the drop with eyes replaces the flat logo and
   its round plate; the button keeps its size, label, focus ring and click behaviour. */
#aquis-mini-trigger[data-aquis-orb="on"] .aquis-mini-core-shell,
#aquis-mini-trigger[data-aquis-orb="on"] .aquis-mini-presence,
#aquis-mini-trigger[data-aquis-orb="on"] .aq-mini-logo,
.aquis-office-orb[data-aquis-orb="on"] .aq-mini-logo { display: none !important; }
#aquis-mini-trigger[data-aquis-orb="on"] .orb-cv {
  position: absolute; left: 50%; bottom: -12px; width: 70px; height: 81px; transform: translateX(-50%);
  pointer-events: none; transition: transform .3s ease;
}
#aquis-mini-trigger[data-aquis-orb="on"]:hover .orb-cv,
#aquis-mini-trigger[data-aquis-orb="on"]:focus-visible .orb-cv { transform: translateX(-50%) translateY(-2px) scale(1.04); }
#aquis-mini-trigger[data-aquis-orb="on"]:focus-visible { outline: 2px solid var(--c-primary, #4cf0de); outline-offset: 4px; border-radius: 18px; }
@media (prefers-reduced-motion: reduce) { #aquis-mini-trigger[data-aquis-orb="on"] .orb-cv { transition: none; } }
.aquis-office-orb[data-aquis-orb="on"] { position: relative; overflow: visible; background: none !important; border: 0 !important; box-shadow: none !important; }
.aquis-office-orb[data-aquis-orb="on"] .orb-cv { position: absolute; left: 50%; top: 50%; width: 52px; height: 60px; transform: translate(-50%, -54%); pointer-events: none; }
/* Compact circular glass Dive button anchored to AQUIS's top-right shoulder on phones (::after keeps 44px touch target). */
@media (max-width:640px) { .iovo-sea-dive-btn { bottom:calc(114px + env(safe-area-inset-bottom, 0px));right:4px;width:24px;height:24px;min-width:0;min-height:0; } }

/* A permanent open-water gutter, at every scroll position and on every Office screen. */
html:not([data-aquis-dock="open"]) [data-shell] .shx-content { margin-inline-end: 88px; }
html [data-shell] [data-aquis-root] { right: 20px; }
[data-aquis-button][data-aquis-orb="on"] { border: 0; background: none; box-shadow: none; backdrop-filter: none; }
[data-aquis-button][data-aquis-orb="on"] .orb-cv { width: 70px; height: 81px; pointer-events: none; }
[data-aquis-orb="on"] > .iox-aquis__face, [data-aquis-orb="on"] > .office-aquis-orb { display: none !important; }
.iox-aquis__head [data-aquis-mark] { width: 42px; height: 48px; flex: none; }
.iox-aquis__head .orb-cv { width: 42px; height: 48px; }
@media (max-width: 880px) { html:not([data-aquis-dock="open"]) [data-shell] .shx-content { margin-inline-end: 76px; } }
/* Screen-specific legacy image/ring skins cannot override the shared component. */
#aquis-mini-trigger[data-aquis-orb="on"] { background: none !important; border: 0 !important; box-shadow: none !important; filter: none !important; }
#aquis-mini-trigger[data-aquis-orb="on"] > .aquis-mini-logo-wrap { display: grid !important; visibility: visible !important; }

/* Plain keeps the page's static theme background, without water or sea life. */
html[data-sea-effect="plain"] .iovo-sea-canvas,
html[data-sea-effect="plain"] .iovo-sea-life,
html[data-sea-effect="plain"] .iovo-sea-still { display: none !important; }

/* Owner November 3: grow the shared drop, its word and Dive by exactly 10%.
   Zoom reserves layout space and leaves each host's pointer-following transforms intact. */
[data-aquis-orb="on"] .orb-cv,
[data-aquis-orb="on"] .orb-name,
.aquis-mini-label,
[data-aquis-root] .aquis-word,
.iovo-sea-dive-btn,
.ceo-dive { zoom: 1.1; }

/* ---------- Scrawl #10 (Frame #3): Dive / Shark Game Smooth Living Sea Background ---------- */
/* Preserve the live sea backdrop (#reef-plate, caustic #sea-light) behind the translucent Dive veil. */
html[data-iovo-game-open] body > #reef-plate,
html[data-iovo-game-open] body > #sea-light {
  visibility: visible !important;
  pointer-events: none !important;
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] {
  background:
    radial-gradient(900px 540px at 22% 108%, rgba(46, 232, 255, .10), transparent 64%),
    radial-gradient(1100px 640px at 80% -12%, rgba(127, 252, 240, .09), transparent 62%),
    linear-gradient(180deg, rgba(3, 30, 44, .18) 0%, rgba(2, 20, 32, .28) 100%) !important;
}
html[data-iovo-game-open][data-theme="dark"] .iovo-game[data-living-sea="1"] {
  background:
    radial-gradient(900px 520px at 24% 110%, rgba(244, 121, 32, .08), transparent 64%),
    linear-gradient(180deg, rgba(12, 9, 7, .22) 0%, rgba(6, 5, 4, .34) 100%) !important;
}
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] {
  background:
    radial-gradient(900px 520px at 22% 108%, rgba(92, 198, 220, .14), transparent 64%),
    linear-gradient(180deg, rgba(252, 254, 255, .24) 0%, rgba(235, 244, 249, .36) 100%) !important;
}
/* Native HTML5 fullscreen enters the top layer above #reef-plate/.iovo-sea-canvas; mirror the exact sea gradient there. */
html[data-iovo-game-open] .iovo-game[data-living-sea="1"]:fullscreen {
  background:
    radial-gradient(ellipse at 45% 118%, rgba(39, 99, 113, .42), transparent 58%),
    radial-gradient(900px 520px at 22% 108%, rgba(46, 232, 255, .14), transparent 62%),
    linear-gradient(180deg, #034859 0%, #073743 76%, #164750 100%) !important;
}
html[data-iovo-game-open][data-theme="dark"] .iovo-game[data-living-sea="1"]:fullscreen {
  background:
    radial-gradient(ellipse 50% 24% at 30% 0%, rgba(255, 170, 100, .06), transparent 70%),
    linear-gradient(180deg, #100d0b 0%, #0b0a09 55%, #070606 100%) !important;
}
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"]:fullscreen {
  background:
    radial-gradient(ellipse 60% 30% at 50% 0%, #ffffff, transparent 72%),
    radial-gradient(ellipse 55% 26% at 12% 100%, rgba(226, 232, 240, .72), transparent 70%),
    linear-gradient(180deg, #fdfdfe 0%, #f6f8fa 55%, #edf1f5 100%) !important;
}
/* Canvas stays pure transparent water over the living sea (zero opaque dark slab). */
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-canvas,
html[data-iovo-game-open][data-theme="dark"] .iovo-game[data-living-sea="1"] .ig-canvas,
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-canvas {
  background: transparent !important;
}
/* Crisp, smooth Apple Glass HUD & controls across Aqua, Dark, and Light themes. */
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-header h2 {
  text-shadow: 0 2px 14px rgba(0, 18, 30, .34);
}
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-header h2 {
  text-shadow: 0 1px 8px rgba(255, 255, 255, .78);
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-hint,
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-status {
  text-shadow: 0 1px 10px rgba(0, 18, 30, .34);
}
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-hint,
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-status {
  color: #214a57;
  text-shadow: 0 1px 6px rgba(255, 255, 255, .82);
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-button:not(.ig-start):not(.ig-close),
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-score,
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-boards {
  background: color-mix(in srgb, var(--ig-panel) 66%, transparent);
  border-color: color-mix(in srgb, var(--ig-text) 20%, transparent);
  -webkit-backdrop-filter: saturate(175%) blur(18px);
  backdrop-filter: saturate(175%) blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 10px 28px rgba(0, 14, 24, .24);
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-button:not(.ig-start):not(.ig-close),
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-score,
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-boards {
  background: rgba(255, 255, 255, .78);
  border-color: rgba(13, 58, 91, .16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 10px 26px rgba(10, 42, 62, .10);
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-button:not(.ig-start):not(.ig-close):hover:not(:disabled) {
  background: color-mix(in srgb, var(--ig-panel) 80%, transparent);
  border-color: color-mix(in srgb, var(--ig-accent) 48%, transparent);
}
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-button:not(.ig-start):not(.ig-close):hover:not(:disabled) {
  background: rgba(255, 255, 255, .92);
  border-color: color-mix(in srgb, var(--ig-accent) 52%, transparent);
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-tabs .ig-button[aria-pressed="true"],
html[data-iovo-game-open][data-theme="dark"] .iovo-game[data-living-sea="1"] .ig-tabs .ig-button[aria-pressed="true"],
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-tabs .ig-button[aria-pressed="true"] {
  color: var(--ig-accent);
  border-color: var(--ig-accent);
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-button:active:not(:disabled) {
  transform: scale(.98);
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-start {
  background: var(--ig-accent);
  color: var(--ig-bg);
  border-color: transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 24px color-mix(in srgb, var(--ig-accent) 36%, transparent);
  transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
}
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-start {
  background: var(--ig-accent);
  color: #ffffff;
  border-color: transparent;
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-start:hover:not(:disabled) {
  filter: brightness(1.06);
}
html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-close {
  background: color-mix(in srgb, var(--ig-panel) 72%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--ig-accent) 72%, transparent);
  color: var(--ig-text);
  -webkit-backdrop-filter: saturate(175%) blur(18px);
  backdrop-filter: saturate(175%) blur(18px);
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}
html[data-iovo-game-open][data-theme="light"] .iovo-game[data-living-sea="1"] .ig-close {
  background: rgba(255, 255, 255, .86);
  border-color: var(--ig-accent);
  color: #143944;
}
@media (prefers-reduced-motion: reduce) {
  html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-button { transition: none; }
  html[data-iovo-game-open] .iovo-game[data-living-sea="1"] .ig-button:active:not(:disabled) { transform: none; }
}
