/* =============================================================
   composer.css — bumped bottom-nav + radial content composer
   ============================================================= */

/* Hide the legacy bottom-nav on mobile (the composer renders its own
   bumped bar). Desktop topnav + desktop FAB stay untouched. */
@media (max-width: 719px) {
  .kd-shell > .kd-bottomnav { display: none !important; }
  .kd-fab.kd-fab--desktop  { display: none !important; }
}

/* Composer system is mobile-only */
.kd-compose { display: none; }
@media (max-width: 719px) {
  .kd-compose { display: block; }
}

/* ---------- Scrim ------------------------------------------------- */
.kd-compose__scrim {
  position: fixed; inset: 0; z-index: 38;
  background: rgba(4,7,12,.55);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.kd-compose.is-open .kd-compose__scrim { opacity: 1; pointer-events: auto; }

/* ---------- Glass dome (the "circle around the +" that grows) ---- */
.kd-compose__dome {
  position: fixed;
  left: 50%;
  /* anchored to the + center (matches .kd-compose__plus bottom + half-height) */
  bottom: calc(58px + env(safe-area-inset-bottom));
  width: 460px; height: 460px;
  z-index: 39;
  border-radius: 50%;
  background:
    radial-gradient(120% 120% at 50% 22%, rgba(36,48,73,.6), rgba(13,19,29,.94) 70%);
  border: 1px solid var(--line-strong);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.06),
    0 -10px 60px -10px rgba(0,0,0,.7);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
          backdrop-filter: blur(22px) saturate(140%);
  transform: translate(-50%, 50%) scale(.1);
  opacity: 0; pointer-events: none;
  transform-origin: 50% 50%;
  transition: transform .46s var(--ease-spring), opacity .3s ease;
}
.kd-compose.is-open .kd-compose__dome {
  transform: translate(-50%, 50%) scale(1); opacity: 1;
}

/* ---------- Radial items (icon + label, no chrome) ---------------- */
.kd-compose__radial {
  position: fixed;
  left: 50%; bottom: calc(58px + env(safe-area-inset-bottom));
  width: 0; height: 0; z-index: 40;
}
.kd-compose__item {
  position: absolute; left: 0; top: 0;
  transform: translate(-50%, -50%) scale(.2);
  opacity: 0; pointer-events: none;
  background: transparent; border: 0; padding: 0;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: var(--c);
  transition: transform .46s var(--ease-spring), opacity .26s ease;
  transition-delay: var(--d-close, 0ms);
  -webkit-tap-highlight-color: transparent;
}
.kd-compose.is-open .kd-compose__item {
  transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(1);
  opacity: 1; pointer-events: auto;
  transition-delay: var(--d-open, 0ms);
}
.kd-compose__ic {
  display: grid; place-items: center;
  width: 44px; height: 44px;
  filter: drop-shadow(0 4px 14px rgba(0,0,0,.55))
          drop-shadow(0 0 18px color-mix(in oklab, var(--c) 60%, transparent));
  transition: transform var(--dur-fast) var(--ease-out);
}
.kd-compose__item:hover .kd-compose__ic { transform: translateY(-3px); }
.kd-compose__item:active .kd-compose__ic { transform: scale(.92); }
.kd-compose__lbl {
  font-family: var(--font-body);
  font-size: 12.5px; font-weight: 600;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
  white-space: nowrap;
}

/* ---------- Bumped bottom-nav background ------------------------- */
.kd-bumpbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 41;
  height: calc(74px + env(safe-area-inset-bottom));
  pointer-events: none;          /* re-enabled on the actual hit areas */
}
/* The blurred fill clipped to the bar+bump shape */
.kd-bumpbar__fill {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(96px + env(safe-area-inset-bottom));
  background: rgba(12,18,28,.78);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
          backdrop-filter: blur(20px) saturate(150%);
  pointer-events: auto;
}
/* The thin top stroke that follows the bump's contour */
.kd-bumpbar__stroke {
  position: absolute; left: 0; right: 0; bottom: env(safe-area-inset-bottom);
  height: 96px;
  pointer-events: none;
  filter: drop-shadow(0 -10px 28px rgba(0,0,0,.45));
}
/* Row of nav items sits on top of the flat portion of the bar */
.kd-bumpbar__row {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(74px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex; align-items: center; justify-content: space-around;
}
.kd-bumpbar__gap { flex: 0 0 88px; }   /* reserved space for the + */

.kd-bumpbar__item {
  flex: 1; background: transparent; border: 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 4px; color: var(--fg-3);
  font-family: var(--font-body); font-size: 11px; font-weight: 500;
  pointer-events: auto;
  transition: color var(--dur-fast) var(--ease-out);
}
.kd-bumpbar__item:hover { color: var(--fg-2); }
.kd-bumpbar__icon {
  width: 44px; height: 28px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all var(--dur-fast) var(--ease-out);
}
.kd-bumpbar__item.is-active { color: #fff; font-weight: 600; }
.kd-bumpbar__item.is-active .kd-bumpbar__icon {
  background: var(--grad-hero); color: #fff;
  box-shadow: var(--glow-magenta);
}

/* Nav row fades while the composer is open (dome takes over) */
.kd-compose.is-open .kd-bumpbar__row { opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.kd-bumpbar__row { transition: opacity .3s ease .05s; }

/* ---------- The + button -- no own background; sits in the bump --- */
.kd-compose__plus {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  /* ~1/4 of the button (16px) above the bar's flat top.
     bar flat top sits 44px from screen bottom → button center at 44 + 16 = 60? no:
     we want ABOVE = 16px, BELOW = 48px. Button is 64px. So button-bottom = 44 - 48 = -4? wrong.
     Visualise: bar flat top at y=44 above screen-bottom. Button center should sit
     16px above that line → at y=60. Button height 64 → button-bottom at y = 60 - 32 = 28. */
  bottom: calc(30px + env(safe-area-inset-bottom));
  z-index: 43;
  width: 64px; height: 64px;
  display: grid; place-items: center;
  background: transparent; border: 0; padding: 0;
  color: #fff; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* The thin ring around the + that sits 2-3px inside the bump edge.
   Bump radius is 38; ring outer radius 35 → 3px gap. */
.kd-compose__plus-ring {
  position: absolute;
  width: 54px; height: 54px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.08),
    0 1px 0 rgba(0,0,0,.4);
  pointer-events: none;
  transition: border-color .35s ease, box-shadow .35s ease;
}
.kd-compose.is-open .kd-compose__plus-ring {
  border-color: rgba(255,255,255,.34);
}
.kd-compose__plus::before {
  /* soft inner glow under the icon — reads as "raised" */
  content: ""; position: absolute;
  width: 60px; height: 60px;
  border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(255,78,168,.42), rgba(255,78,168,0) 70%);
  opacity: .9;
  transition: opacity .35s ease, background .35s ease;
  pointer-events: none;
}
.kd-compose.is-open .kd-compose__plus::before {
  background: radial-gradient(closest-side,
    rgba(255,255,255,.20), rgba(255,255,255,0) 70%);
  opacity: 1;
}
.kd-compose__plus-ic {
  position: relative; z-index: 1;
  transition: transform .55s var(--ease-spring);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}
/* + spins several turns into × */
.kd-compose.is-open .kd-compose__plus-ic { transform: rotate(765deg); }

/* Reduced motion: keep the layout transitions, drop the long spin */
@media (prefers-reduced-motion: reduce) {
  .kd-compose__dome,
  .kd-compose__item,
  .kd-compose__plus-ic,
  .kd-bumpbar__row { transition-duration: .01ms !important; }
  .kd-compose.is-open .kd-compose__plus-ic { transform: rotate(45deg); }
}
