/* ========================================================
   ORLOV BASE — STICKY SMART DYNAMIC ISLAND HUD
   Adaptive Chameleon Navigation (Light Craft <-> Black Blocks)
   ======================================================== */

.ob-sticky-hud-wrap {
  position: fixed;
  top: 16px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  pointer-events: none;
  padding: 0 16px;
  box-sizing: border-box;
}

.ob-dynamic-island-hud {
  pointer-events: auto;
  background: rgba(18, 17, 16, 0.90);
  color: #ffffff;
  border-radius: 9999px;
  padding: 6px 10px 6px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: default;
  position: relative;
  max-width: calc(100vw - 32px);
}

.ob-dynamic-island-hud:hover {
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45), 0 0 20px rgba(45, 196, 107, 0.25);
  border-color: rgba(45, 196, 107, 0.4);
}

/* ----------------------------------------------------
   ADAPTIVE CHAMELEON ON DARK / BLACK BLOCKS (.is-on-dark)
   ---------------------------------------------------- */
.ob-dynamic-island-hud.is-on-dark {
  background: rgba(234, 230, 221, 0.94);
  color: #000000;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(45, 196, 107, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-logo {
  color: #000000;
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-divider {
  background: rgba(0, 0, 0, 0.15);
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-status-text {
  color: #444440;
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-ring-bg {
  stroke: rgba(0, 0, 0, 0.12);
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-link {
  color: #333333;
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-link:hover,
.ob-dynamic-island-hud.is-on-dark .ob-hud-link.is-active {
  color: #000000;
  background: rgba(0, 0, 0, 0.08);
}


.ob-dynamic-island-hud.is-on-dark .ob-hud-cta {
  background: #000000;
  color: #ffffff;
  border-color: transparent;
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-cta:hover {
  background: var(--color-accent, #2dc46b);
  color: #000000;
  box-shadow: 0 0 18px rgba(45, 196, 107, 0.5);
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-mobile-btn {
  color: #000000;
}

/* ----------------------------------------------------
   HUD INTERNAL COMPONENTS
   ---------------------------------------------------- */
.ob-hud-brand {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.ob-hud-logo {
  font-family: var(--font-display, 'Oswald', sans-serif);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #ffffff;
  line-height: 1;
  transition: color 0.3s ease;
}

.ob-hud-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent, #2dc46b);
  box-shadow: 0 0 10px var(--color-accent, #2dc46b);
  animation: ob-hud-pulse 2s infinite ease-in-out;
}

@keyframes ob-hud-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.ob-hud-divider {
  width: 1px;
  height: 18px;
  background: rgba(255, 255, 255, 0.18);
  transition: background 0.3s ease;
  flex-shrink: 0;
}

/* Dynamic contextual status indicator */
.ob-hud-context {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  color: #bbb;
  white-space: nowrap;
  user-select: none;
}

.ob-hud-ring {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.ob-hud-ring svg {
  transform: rotate(-90deg);
  display: block;
}

.ob-hud-ring-progress {
  transition: stroke-dasharray 0.25s ease;
}

.ob-hud-status-text {
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

/* Navigation links */
.ob-hud-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ob-hud-link {
  color: rgba(255, 255, 255, 0.72);
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}


.ob-hud-link:hover,
.ob-hud-link.is-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

/* CTA button */
.ob-hud-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--color-accent, #2dc46b);
  color: #000000;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 800;
  padding: 5px 12px 5px 5px;
  border-radius: 9999px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}

.ob-hud-cta:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 15px var(--color-accent-glow, rgba(45, 196, 107, 0.5));
}

.ob-hud-cta-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ob-hud-cta-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Mobile & Tablet Styles */
.ob-hud-mobile-btn {
  display: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  gap: 6px;
  align-items: center;
  justify-content: center;
  transition: all 0.25s ease;
}

.ob-hud-mobile-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-mobile-btn {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.15);
  color: #000000;
}

.ob-dynamic-island-hud.is-on-dark .ob-hud-mobile-btn:hover {
  background: rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 0, 0, 0.25);
}

.ob-hud-mobile-sheet {
  display: none;
  pointer-events: auto;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 32px);
  max-width: 360px;
  background: rgba(18, 17, 16, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  padding: 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  flex-direction: column;
  gap: 6px;
  z-index: 9999;
}

.ob-sticky-hud-wrap.is-on-dark .ob-hud-mobile-sheet {
  background: rgba(234, 230, 221, 0.98);
  border-color: rgba(0, 0, 0, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}

.ob-hud-mobile-sheet.is-open {
  display: flex;
  animation: hudSheetFade 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hudSheetFade {
  from { opacity: 0; transform: translate(-50%, -8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.ob-hud-mobile-link {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 12px;
  transition: all 0.2s;
}

.ob-sticky-hud-wrap.is-on-dark .ob-hud-mobile-link {
  color: #111111;
}

.ob-hud-mobile-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.ob-sticky-hud-wrap.is-on-dark .ob-hud-mobile-link:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #000000;
}

.ob-hud-mobile-cta {
  margin-top: 6px;
  background: var(--color-accent, #2dc46b);
  color: #000000;
  text-decoration: none;
  font-weight: 800;
  font-size: 0.85rem;
  padding: 10px;
  border-radius: 12px;
  text-align: center;
}

@media (max-width: 900px) {
  .ob-hud-nav,
  .ob-hud-divider:nth-of-type(2) {
    display: none;
  }
  .ob-hud-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 600px) {
  .ob-sticky-hud-wrap {
    top: 12px;
    padding: 0 14px;
  }
  .ob-dynamic-island-hud {
    width: 100%;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 6px 14px;
    gap: 8px;
    box-sizing: border-box;
  }
  .ob-hud-logo {
    font-size: 1.15rem;
  }
  .ob-hud-divider,
  .ob-hud-context,
  .ob-hud-cta {
    display: none !important;
  }
  .ob-hud-mobile-btn {
    display: inline-flex !important;
  }
}
