/* =============================================================================
   PositiveGym – Public Navbar  v2026-11
   ============================================================================= */

@import "../shared/site-chrome.css?v=20261116-redesign";

/* ── Sticky header ─────────────────────────────────────────────────────────── */
.nav-bar {
  position: sticky;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  background: rgba(13,15,17,.96);
  border-bottom: 1px solid rgba(255,255,255,.07);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  padding: 0;
}

/* ── Logo ──────────────────────────────────────────────────────────────────── */
.nav-logo a { display: inline-flex; align-items: center; }
.nav-logo img {
  width: 96px;
  height: auto;
  display: block;
}

/* ── Desktop nav links ─────────────────────────────────────────────────────── */
.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
  margin-left: auto;
}

.nav-links li { display: flex; align-items: center; }

.nav-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 0;
  min-height: 72px;
  color: #c8cdd4;
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: color .18s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #f4d20d;
}

/* ── Live Chat badge ───────────────────────────────────────────────────────── */
.admin-live-chat-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  min-height: 44px;
  border-radius: 7px;
  transition: color .18s, background .18s;
}
.admin-live-chat-link:hover,
.admin-live-chat-link:focus-visible,
.admin-live-chat-link.has-unread {
  color: #f4d22b;
  background: rgba(244,210,13,.08);
}

.admin-live-chat-icon {
  display: inline-flex;
  width: 20px;
  height: 20px;
  align-items: center;
  justify-content: center;
  color: #f4d22b;
  transition: transform .18s;
}
.admin-live-chat-link:hover .admin-live-chat-icon,
.admin-live-chat-link:focus-visible .admin-live-chat-icon { transform: translateY(-1px); }
.admin-live-chat-icon svg { width: 18px; height: 18px; display: block; }

.admin-live-chat-badge {
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f4d22b;
  color: #161616;
  font-size: 10px;
  font-weight: 800;
}
.admin-live-chat-badge[hidden] { display: none; }

.admin-live-chat-link.has-unread .admin-live-chat-icon {
  animation: chatIconPulse 1.8s ease-in-out infinite;
}
.admin-live-chat-link.has-new .admin-live-chat-badge {
  animation: chatBadgePop .55s ease-out;
}

@keyframes chatIconPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}
@keyframes chatBadgePop {
  0%  { transform: scale(1);    box-shadow: 0 0 0 0 rgba(244,210,43,.5); }
  45% { transform: scale(1.2);  box-shadow: 0 0 0 7px rgba(244,210,43,.1); }
  100%{ transform: scale(1);    box-shadow: 0 0 0 0 rgba(244,210,43,0); }
}

/* ── Mobile hamburger ──────────────────────────────────────────────────────── */
.nav-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid #f4d20d;
  border-radius: 8px;
  background: transparent;
  color: #f4d20d;
  cursor: pointer;
  z-index: 1003;
  transition: background .15s;
}
.nav-toggle:hover { background: rgba(244,210,13,.10); }
.nav-toggle__icon { display: block; width: 22px; height: 22px; }

/* ── Backdrop ──────────────────────────────────────────────────────────────── */
.nav-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1001;
  border: 0;
  background: rgba(0,0,0,.60);
  backdrop-filter: blur(2px);
}
.nav-backdrop[hidden] { display: none; }
body.nav-drawer-open { overflow: hidden; }

/* ── Utility ───────────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .nav-toggle { display: grid !important; }

  .nav-links {
    position: fixed;
    inset: 0 0 0 auto;
    z-index: 1002;
    width: min(300px, 86vw) !important;
    height: 100dvh;
    margin: 0 !important;
    padding: 76px 14px 24px !important;
    flex-direction: column;
    align-items: stretch;
    gap: 3px !important;
    overflow-y: auto;
    background: #14171b;
    border-left: 1px solid rgba(255,255,255,.10);
    box-shadow: -20px 0 60px rgba(0,0,0,.55);
    transform: translateX(105%);
    visibility: hidden;
    transition: transform .22s cubic-bezier(.4,0,.2,1), visibility .22s ease;
  }
  .nav-links.is-open {
    transform: translateX(0);
    visibility: visible;
  }
  .nav-links[hidden] { display: none !important; }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: flex !important;
    width: 100%;
    min-height: 50px !important;
    padding: 0 16px !important;
    border-radius: 9px;
    font-size: 15px !important;
  }
  .admin-live-chat-link { width: 100%; justify-content: flex-start; }
}

/* ── Light mode (public landing page only — authenticated navbars stay dark) ── */
/* Use !important to beat the site-chrome.css mobile breakpoint override         */
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-bar {
  background: rgba(255,255,255,.97) !important;
  border-bottom-color: rgba(0,0,0,.09) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links a {
  color: #374151;
}
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links a:hover,
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links a.active {
  color: #c8a200;
  background: rgba(0,0,0,.04);
}
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links a::after {
  background: #c8a200;
}
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-toggle {
  border-color: rgba(0,0,0,.18);
  color: #374151;
  background: transparent;
}
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-toggle:hover {
  background: rgba(0,0,0,.06);
}
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .pg-theme-toggle:not(.pg-theme-toggle--floating) {
  color: #374151;
  background: rgba(0,0,0,.05);
  border-color: rgba(0,0,0,.18);
}
html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .pg-theme-toggle:not(.pg-theme-toggle--floating):hover {
  background: rgba(0,0,0,.09);
  border-color: rgba(0,0,0,.28);
}
@media (max-width: 1024px) {
  html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-bar {
    background: #ffffff !important;
    border-bottom-color: rgba(0,0,0,.09) !important;
  }
  html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links {
    background: #ffffff;
    border-left-color: rgba(0,0,0,.09);
    box-shadow: -12px 0 40px rgba(0,0,0,.12);
  }
  html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links a { color: #374151; }
  html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links a:hover,
  html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links a.active {
    color: #c8a200;
    background: rgba(0,0,0,.04);
  }
  html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-links a::after {
    background: #c8a200;
  }
  html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .nav-toggle {
    color: #374151 !important;
    border-color: rgba(0,0,0,.18) !important;
    background: transparent !important;
  }
  html[data-theme="light"] body:not(.owner-page):not(.admin-page):not(.coach-page):not(.client-body) .pg-theme-toggle:not(.pg-theme-toggle--floating) {
    color: #374151 !important;
    background: rgba(0,0,0,.05) !important;
    border-color: rgba(0,0,0,.18) !important;
  }
}
