/* Shared behaviour on top of the generated pages (inline styles come from the design canvas). */

/* clip instead of hidden: keeps the glows from adding horizontal scroll without breaking position: sticky */
.kp { overflow: clip !important; }

/* "Skip to content": hidden until reached with the keyboard */
.kp-skip { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 10px 16px; border-radius: 8px; background: #3089F1; color: #FFFFFF !important; font-size: 14px; }
.kp-skip:focus { top: 16px; }

/* Policy: the desktop index follows the reader */
.kp-toc-d { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; }
.kp-toc-d a { border-radius: 8px; transition: color .15s ease, background-color .15s ease; }

@media (hover: hover) and (pointer: fine) {
  .kp a, .kp a img, .kp button { transition: color .15s ease, background-color .15s ease, border-color .15s ease, transform .15s ease, opacity .15s ease; }

  /* navbar and footer links */
  .kp-links a:hover, footer a:hover { color: #FFFFFF !important; }
  header a:first-child:hover img { transform: rotate(-8deg); }

  /* every pill button gets the same hover, wherever it sits (also inside a <p>) */
  .kp a[style*="border: 1px solid #3089F1"][style*="999px"]:hover { color: #FFFFFF !important; background: rgba(48,137,241,0.26) !important; }
  .kp a[style*="rgba(255,255,255,0.14)"][style*="999px"]:hover { color: #FFFFFF !important; border-color: rgba(255,255,255,0.32) !important; }
  .kp button:hover { border-color: rgba(255,255,255,0.32) !important; }

  /* Google Play badge */
  .kp a[href*="play.google.com"]:hover img { transform: translateY(-2px); opacity: .92; }

  /* plain links inside text (not pill buttons) */
  .kp p a:not([style*="999px"]):hover, .kp li a:not([style*="999px"]):hover { color: #7AB4F7 !important; }

  /* policy index */
  .kp-toc-d a:not(.is-active):hover { color: #FFFFFF !important; background: rgba(255,255,255,0.05) !important; }
  .kp-toc-m a:hover { color: #FFFFFF !important; }
}
