/* CAMPAIGN P-HOME: placeholder, filled in by the owning worker's own branch. Loaded after style.css so it can override with scoped, additive rules only. */

/* N1/N2/N4 (nav worker): move the public-page #page-tabs trigger nav from
   the top-right white Bulma "is-toggle" boxes to a compact, subtle,
   translucent, bottom-right text nav. Scoped to #page-tabs (and its
   children) only -- never touches .tab-window (modal worker's territory)
   or .mobile-nav's layout mechanics (only hiding is inherited from
   style.css's existing max-width:768px rule, which already keeps this
   element out of the way on narrow viewports -- see report). Every rule
   below uses #page-tabs as the base selector so ID specificity clears
   style.css's ".tabs:not(.core)" and bulma.min.css's ".tabs.is-toggle"
   rules without needing !important. */

#page-tabs {
  /* style.css's ".tabs:not(.core)" sets position:absolute; top:8px; right:8px.
     Re-anchor to the bottom-right instead, fixed so it stays put on scroll. */
  position: fixed;
  top: auto;
  bottom: 14px;
  right: 14px;
  left: auto;
  z-index: 15; /* above .background (0) and .drop-overlay (10), below .tab-window.active (4)... */
  max-width: calc(100vw - 28px);
  /* CAMPAIGN P-HOME / integration owner (post-merge live measurement):
     Bulma's base ".tabs" rule sets margin-bottom:1.5rem (24px), which
     still applies to a position:fixed element and was pushing the real
     bottom offset to 38px instead of the intended 14px (confirmed via
     getComputedStyle -- marginBottom:"24px" -- on the live deployed
     page, not a test-harness artifact as originally suspected). */
  margin-bottom: 0;
}

/* The real visual chrome lives on the <ul>: this is what was rendering as
   a row of white boxes (bulma ".tabs.is-toggle a" gives every link its own
   white, bordered, box-shaped button). Replace that with one small
   translucent pill-shaped bar and let the links inside it be plain text. */
#page-tabs ul {
  border-bottom: none;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 4px;
  background: rgba(20, 20, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Graceful upgrade: blur what's behind the bar so it reads as "translucent
   glass" rather than a flat dark rectangle, on both bright and dark
   background photos. Optional -- falls back cleanly to the solid rgba()
   above wherever backdrop-filter isn't supported. */
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  #page-tabs ul {
    background: rgba(20, 20, 20, 0.4);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    backdrop-filter: blur(10px) saturate(1.2);
  }
}

#page-tabs li {
  font-size: 0.78rem;
}

#page-tabs li + li {
  margin-left: 0; /* overrides bulma's is-toggle "-1px" joined-box spacing */
}

#page-tabs a {
  /* Clear bulma's is-toggle box look (white background, visible border,
     square/joined corners) and style.css's ".tabs:not(.core) li a" white
     box-with-black-text look. */
  background: transparent;
  border: none;
  border-radius: 7px;
  color: #fff;
  opacity: 0.85;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0 12px;
  margin: 0;
  /* Accessible hit target: at least 44x44 even though the visible text/
     padding is small, so this stays comfortably tappable on touch. */
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

#page-tabs a:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: transparent;
  color: #fff;
  opacity: 1;
}

/* Visible keyboard focus state -- not relying on color alone. */
#page-tabs a:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
#page-tabs a:focus:not(:focus-visible) {
  outline: none;
}
#page-tabs a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  background: rgba(255, 255, 255, 0.16);
}

/* Active tab trigger (JS adds "is-active" to the <li> when its panel is
   open) -- keep it distinguishable without going back to a filled box. */
#page-tabs li.is-active a {
  background: rgba(255, 255, 255, 0.28);
  border-color: transparent;
  color: #fff;
  opacity: 1;
}
