/* =============================================================================
   biolbe public-page chrome — the small fixed top-left box (logo / theme toggle
   / edit) on user-rendered profile pages.

   User pages render arbitrary HTML + CSS (style-src 'unsafe-inline'), so this
   file is the hardening layer: it is loaded LAST (a <link> at the very bottom of
   <body>, after the user content), every declaration is !important, the box uses
   the maximum z-index, and colours are hard-coded (not var() tokens) so a user
   redefining :root can't recolour it. This is best-effort — a determined user
   can still override via their own HTML — but it makes hiding/restyling hard.
   ========================================================================== */

/* neutralise inheritable user styles across the whole chrome subtree */
.blb-chrome,
.blb-chrome * {
  box-sizing: border-box !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  font-style: normal !important;
  font-weight: 600 !important;
  text-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
  text-decoration: none !important;
  float: none !important;
  filter: none !important;
  animation: none !important;
  transition: none !important;
}

.blb-chrome {
  position: fixed !important;
  top: 14px !important;
  left: 14px !important;
  right: auto !important;
  bottom: auto !important;
  z-index: 2147483647 !important;
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 6px !important;
  width: auto !important;
  height: auto !important;
  max-width: none !important;
  max-height: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  border-radius: 14px !important;
  background: oklch(0.21 0.022 286 / 0.92) !important;
  border: 1px solid oklch(1 0 0 / 0.12) !important;
  box-shadow: 0 10px 28px -12px oklch(0 0 0 / 0.75) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  backdrop-filter: blur(8px) !important;
  visibility: visible !important;
  opacity: 1 !important;
  transform: none !important;
  clip: auto !important;
  clip-path: none !important;
  pointer-events: auto !important;
  overflow: visible !important;
}

.blb-chrome__logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  flex: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  background: transparent !important;
  overflow: hidden !important;
}
.blb-chrome__logo img {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  max-width: none !important;
  object-fit: contain !important;
  border-radius: 0 !important;
  filter: none !important;
}

.blb-chrome__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 32px !important;
  padding: 0 13px !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 9px !important;
  font-size: 12.5px !important;
  line-height: 1 !important;
  white-space: nowrap !important;
  color: oklch(0.93 0.01 286) !important;
  background: oklch(1 0 0 / 0.06) !important;
  cursor: pointer !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}
.blb-chrome__link:hover {
  background: oklch(1 0 0 / 0.13) !important;
  color: #fff !important;
}

/* the fixed logo accent — hard-coded so user :root token overrides can't shift it */
.blb-chrome__link--edit {
  background: oklch(0.58 0.227 271) !important;
  color: #fff !important;
}
.blb-chrome__link--edit:hover {
  background: oklch(0.63 0.227 271) !important;
  color: #fff !important;
}

/* dark / light theme toggle — icon-only, square */
.blb-chrome__toggle {
  width: 32px !important;
  padding: 0 !important;
}
.blb-chrome__ico {
  width: 17px !important;
  height: 17px !important;
  display: block !important;
  color: inherit !important;
}
/* show the moon in dark (the default), the sun in light */
html[data-theme='light'] .blb-chrome__moon { display: none !important; }
html:not([data-theme='light']) .blb-chrome__sun { display: none !important; }

@media (max-width: 560px) {
  .blb-chrome {
    top: 10px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    gap: 6px !important;
  }
  .blb-chrome__link { padding: 0 11px !important; font-size: 12px !important; }
}
