/* =========================================================
   ZOMNIVERSE LEARN — COMPACT POLICY DISCLAIMER

   Purpose:
   - Move policy links out of the right navigation
   - Keep publication controls visually clean
   - Remain visible and responsive on mobile
========================================================= */

.learn-disclaimer {
  position: fixed;
  left: 50%;
  bottom: max(
    8px,
    env(safe-area-inset-bottom)
  );
  z-index: 99940;

  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3px 8px;

  width: max-content;
  max-width: calc(100vw - 36px);
  min-height: 32px;

  box-sizing: border-box;
  margin: 0;
  padding: 7px 14px;

  transform: translateX(-50%);

  border:
    1px solid
    rgba(90, 108, 158, 0.18);

  border-radius: 999px;

  background:
    rgba(247, 249, 254, 0.88);

  color:
    rgba(59, 70, 105, 0.86);

  font-size: 0.7rem;
  line-height: 1.35;
  letter-spacing: 0.018em;
  text-align: center;

  backdrop-filter:
    blur(14px)
    saturate(0.9);

  -webkit-backdrop-filter:
    blur(14px)
    saturate(0.9);

  box-shadow:
    0 6px 24px
    rgba(32, 44, 78, 0.07);
}

.learn-disclaimer__message,
.learn-disclaimer__version,
.learn-disclaimer__links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.learn-disclaimer__version {
  gap: 3px;
}

.learn-disclaimer strong {
  color: #293654;
  font-weight: 720;
}

.learn-disclaimer__links {
  gap: 8px;
}

.learn-disclaimer a {
  color: #5969a2;
  font-weight: 560;
  text-decoration: none;

  transition:
    color 150ms ease,
    text-decoration-color 150ms ease;
}

.learn-disclaimer a:hover {
  color: #344475;
  text-decoration: underline;
}

.learn-disclaimer a:focus-visible {
  color: #344475;

  outline:
    2px solid
    rgba(91, 112, 179, 0.54);

  outline-offset: 3px;
  border-radius: 4px;
}

/*
 * Reserve visual space below the final Markdown content so
 * the fixed disclaimer does not cover the final paragraph.
 */
#learn-md-content::after {
  content: "";

  display: block;
  width: 100%;
  height: 58px;

  pointer-events: none;
}

/* =========================================================
   MOBILE

   The full disclaimer moves into the Learn AI dock as a
   compact policy row on mobile.
========================================================= */

@media (max-width: 768px) {
  .learn-disclaimer {
    display: none;
  }

  /*
   * The large fixed disclaimer is absent, so the additional
   * desktop footer clearance is no longer required.
   */
  #learn-md-content::after {
    height: 24px;
  }
}

/* =========================================================
   REDUCED TRANSPARENCY FALLBACK
========================================================= */

@supports not (
  backdrop-filter: blur(1px)
) {
  .learn-disclaimer {
    background:
      rgba(247, 249, 254, 0.97);
  }
}