/* ============================================================
   Header status ring + fullscreen story viewer (WhatsApp / IG style)
   ============================================================ */

.nav-status-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  margin-right: 0;
  gap: 3px;
}

.nav-status-label {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
}

#navbar.scrolled .nav-status-label {
  color: rgba(0, 0, 0, 0.5);
}

.nav-status-btn {
  position: relative;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  flex-shrink: 0;
}

.nav-status-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 2.5px;
  background: linear-gradient(210deg, #25d366, #128c7e, #34b7f1, #9b59b6, #e91e8c, #25d366);
  background-size: 200% 200%;
  animation: navStatusRingSpin 4s linear infinite;
  box-shadow: 0 0 14px rgba(37, 211, 102, 0.35);
}

.nav-status-btn--fresh .nav-status-ring {
  animation: navStatusRingSpin 2.2s linear infinite, navStatusPulse 1.8s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(37, 211, 102, 0.55), 0 0 28px rgba(52, 183, 241, 0.25);
}

@keyframes navStatusRingSpin {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

@keyframes navStatusPulse {
  0%,
  100% {
    filter: brightness(1);
    transform: scale(1);
  }
  50% {
    filter: brightness(1.12);
    transform: scale(1.04);
  }
}

.nav-status-inner {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

.nav-status-inner img {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

#navbar.scrolled .nav-status-inner {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(0, 0, 0, 0.08);
}

#navbar.scrolled .nav-status-inner img {
  filter: none;
}

/* ----- Fullscreen viewer ----- */
.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 100050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  pointer-events: none;
}

.story-viewer.is-open {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.story-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  cursor: pointer;
}

.story-viewer__shell {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: min(520px, 100vw);
  height: min(88vh, 820px);
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
}

.story-viewer__close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  z-index: 10;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.story-viewer__close:hover {
  background: rgba(255, 255, 255, 0.22);
  transform: scale(1.05);
}

.story-viewer__progress {
  display: flex;
  gap: 5px;
  padding: 12px 48px 10px 12px;
  flex-shrink: 0;
}

.story-viewer__seg {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 2px;
  overflow: hidden;
}

.story-viewer__fill {
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 2px;
  will-change: width;
}

.story-viewer__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 8px 12px;
}

.story-viewer__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.45s ease;
}

.story-viewer__img.is-visible {
  opacity: 1;
}

.story-viewer__hit {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 35%;
  max-width: 160px;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
}

.story-viewer__hit--prev {
  left: 0;
}

.story-viewer__hit--next {
  right: 0;
}

@media (max-width: 768px) {
  .nav-status-btn {
    width: 40px;
    height: 40px;
  }
  .story-viewer__progress {
    padding-right: 52px;
  }
  .story-viewer__hit {
    width: 42%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-status-ring {
    animation: none;
    background: linear-gradient(135deg, #25d366, #128c7e);
  }
  .nav-status-btn--fresh .nav-status-ring {
    animation: none;
  }
  .story-viewer__img {
    transition: opacity 0.2s ease;
  }
}
