/* ============================================================
   Capture Pipeline — Global Nav Bar (fixed, glassmorphic)
   Sliding pill indicator on desktop, hamburger drawer on mobile.
   ============================================================ */

.cp-nav-bar {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}
body.admin-bar .cp-nav-bar { top: calc(16px + 32px); }
@media (max-width: 782px) {
  body.admin-bar .cp-nav-bar { top: calc(16px + 46px); }
}
.cp-nav-bar > * { pointer-events: auto; }

/* ── Brand pill (logo) — rotating conic-gradient border ──────
   Outer wrapper has overflow:hidden + 1px padding. The ::before pseudo-
   element holds the spinning conic-gradient and is sized larger than the
   pill so the rotation never reveals empty corners. The __inner block is
   the dark glass interior, leaving only ~1px of the conic visible as a
   rotating rainbow border. */
.cp-nav-brand {
  position: relative;
  display: inline-block;
  border-radius: var(--cp-radius-pill);
  padding: 1px;
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 0 12px rgba(124, 92, 252, 0.12), 0 4px 16px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.cp-nav-brand:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(124, 92, 252, 0.20), 0 6px 24px rgba(0, 0, 0, 0.5);
}
.cp-nav-brand::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 800%;
  background: conic-gradient(from 0deg,
    #c084fc   0deg,
    #818cf8  90deg,
    #a78bfa 180deg,
    #5c6cfc 270deg,
    #c084fc 360deg);
  animation: cp-spin-gradient 10s linear infinite;
  z-index: 0;
}
.cp-nav-brand__inner {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 18px 7px 9px;
  border-radius: var(--cp-radius-pill);
  background: radial-gradient(ellipse at 30% 50%,
    rgba(80, 30, 160, 0.38) 0%,
    rgba(10, 8, 30, 0.94) 70%);
}
.cp-nav-brand__icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(124, 92, 252, 0.45));
}
.cp-nav-brand__icon img,
.cp-nav-brand__icon svg {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.cp-nav-brand__text {
  font-family: var(--cp-font-heading);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.01em;
  background: linear-gradient(135deg, #ffffff 0%, #c4b5fd 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
}

/* ── Center pill (page switcher) ─────────────────────────────── */
.cp-nav-pill {
  position: relative;
  display: inline-flex;
  padding: 6px 8px;
  border-radius: var(--cp-radius-pill);
  background: rgba(12, 10, 28, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.cp-nav-pill ul {
  display: inline-flex;
  margin: 0;
  padding: 0;
  list-style: none;
  gap: 4px;
  position: relative;
  z-index: 1;
}
.cp-nav-pill__indicator {
  position: absolute;
  top: 6px;
  height: calc(100% - 12px);
  border-radius: var(--cp-radius-pill);
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.18) 0%, rgba(92, 108, 252, 0.12) 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 0 12px rgba(124, 92, 252, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition:
    left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    width 0.30s ease,
    opacity 0.20s ease;
}
.cp-nav-pill a {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--cp-radius-pill);
  font-family: var(--cp-font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--cp-text-secondary);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, font-weight 0.2s;
}
.cp-nav-pill .current-menu-item > a,
.cp-nav-pill a[aria-current="page"] {
  color: var(--cp-text-primary);
  font-weight: 600;
}

/* ── Right side actions (lang switcher + mobile burger) ──────── */
.cp-nav-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.cp-langsw {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--cp-radius-pill);
  background: rgba(12, 10, 28, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}
.cp-langsw button {
  padding: 5px 11px;
  border-radius: var(--cp-radius-pill);
  background: transparent;
  border: 0;
  color: var(--cp-text-muted);
  font-family: var(--cp-font-body);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}
.cp-langsw button:hover { color: var(--cp-text-secondary); }
.cp-langsw button.active {
  color: var(--cp-accent-light);
  background: rgba(124, 92, 252, 0.18);
}

.cp-nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid transparent;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background:
    radial-gradient(ellipse at 40% 35%, rgba(80, 30, 160, 0.45) 0%, rgba(10, 8, 30, 0.88) 70%) padding-box,
    linear-gradient(135deg, #c084fc 0%, #818cf8 45%, #a78bfa 80%, rgba(255, 213, 136, 0.53) 100%) border-box;
  box-shadow: 0 0 20px rgba(124, 92, 252, 0.3), 0 0 40px rgba(59, 130, 246, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cp-nav-burger:hover { transform: scale(1.04); }
.cp-nav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #eeeef4;
  border-radius: 1px;
  transition: transform 0.25s, opacity 0.2s;
}
.cp-nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.cp-nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.cp-nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ── Mobile drawer ───────────────────────────────────────────── */
.cp-nav-drawer {
  position: fixed;
  top: 80px;
  left: 16px;
  right: 16px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border-radius: 24px;
  background: rgba(12, 10, 28, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cp-nav-drawer.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
body.admin-bar .cp-nav-drawer { top: calc(80px + 32px); }
@media (max-width: 782px) {
  body.admin-bar .cp-nav-drawer { top: calc(80px + 46px); }
}
.cp-nav-drawer a {
  display: block;
  padding: 12px 18px;
  border-radius: 14px;
  color: var(--cp-text-secondary);
  text-decoration: none;
  font-family: var(--cp-font-body);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.cp-nav-drawer a:hover,
.cp-nav-drawer a[aria-current="page"] {
  background: rgba(124, 92, 252, 0.12);
  color: var(--cp-text-primary);
}

/* ── Responsive breakpoints ──────────────────────────────────── */
@media (max-width: 768px) {
  .cp-nav-pill { display: none; }
  .cp-nav-burger { display: inline-flex; }
  .cp-nav-bar { left: 12px; right: 12px; top: 12px; }
  .cp-nav-brand { padding: 8px 14px; font-size: 14px; }
  .cp-langsw { padding: 3px; }
  .cp-langsw button { padding: 4px 9px; font-size: 11px; }
}
@media (min-width: 769px) {
  .cp-nav-drawer { display: none !important; }
}
