/* ==========================================================================
   KaspaNova — NAVBAR (FINAL / UNIFIED / DESIGN SYSTEM)
   Scope: Top Navigation (Index + Dashboard)
========================================================================== */

/* --------------------------------------------------------------------------
   ROOT
--------------------------------------------------------------------------- */


.kn-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;

  background: linear-gradient(
    180deg,
    rgba(9, 13, 20, 0.94),
    rgba(6, 10, 18, 0.9)
  );

  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(112,199,186,0.25);
}

.kn-navbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 22px;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* --------------------------------------------------------------------------
   BRAND
--------------------------------------------------------------------------- */

.kn-nav-brand,
.kn-navbar a[href="/"] {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.kn-nav-brand img,
.kn-brand-mobile-img {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(112,199,186,0.35));
}

@media (max-width: 768px) {
  .kn-nav-brand img,
  .kn-brand-mobile-img {
    height: 26px;
  }
}

/* --------------------------------------------------------------------------
   NAV LINKS (landing only)
--------------------------------------------------------------------------- */

.kn-nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.kn-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;

  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.2px;

  color: #9ca3af;
  text-decoration: none;
  transition: color .2s ease;
}

.kn-nav-link:hover {
  color: #70C7BA;
}

.kn-nav-link .kn-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(112,199,186,0.12);
  color: #70C7BA;
  transition: all .22s ease;
}

.kn-nav-link:hover .kn-icon {
  background: rgba(112,199,186,0.22);
  box-shadow: 0 0 12px rgba(112,199,186,0.45);
}

/* --------------------------------------------------------------------------
   RIGHT ZONE (shared)
--------------------------------------------------------------------------- */

.kn-navbar .d-flex.align-items-center {
  gap: 14px;
}

/* --------------------------------------------------------------------------
   ICON BUTTONS (ALL ICONS)
--------------------------------------------------------------------------- */

.kn-nav-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 999px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: transparent;
  border: 1px solid transparent;

  color: #9ca3af; /* default grey */
  cursor: pointer;

  transition: all .2s ease;
}

.kn-nav-icon-btn svg,
.kn-nav-icon-btn i {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

/* hover → KASPA GREEN */
.kn-nav-icon-btn:hover {
  background: rgba(112,199,186,0.14);
  border-color: rgba(112,199,186,0.45);
  color: #70C7BA;
  box-shadow: 0 0 14px rgba(112,199,186,0.45);
}

/* active state */
.kn-nav-icon-btn.active {
  background: rgba(112,199,186,0.18);
  border-color: rgba(112,199,186,0.55);
  color: #70C7BA;
  box-shadow: 0 0 18px rgba(112,199,186,0.6);
}

/* --------------------------------------------------------------------------
   THEME TOGGLE (SUN / MOON)
--------------------------------------------------------------------------- */

.kn-theme-toggle {
  position: relative;
  width: 46px;
  height: 24px;
  border-radius: 999px;

  background: rgba(15, 23, 42, 0.65); /* same as lang switch */
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(8px);

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 0 6px;
  cursor: pointer;

  transition: all .18s ease;
}

/* hover = subtle premium glow */
.kn-theme-toggle:hover {
  border-color: rgba(167,139,250,0.45);
  box-shadow: 0 0 14px rgba(167,139,250,0.25);
}

.kn-theme-pill {
  position: absolute;
  inset: 3px auto 3px 3px;
  width: 18px;
  border-radius: 999px;

  background: linear-gradient(135deg, #a78bfa, #c4b5fd);
  box-shadow: 0 0 10px rgba(167,139,250,0.6);

  transition: transform .3s cubic-bezier(.16,1,.3,1);
}

.theme-dark .kn-theme-pill {
  transform: translateX(22px);
}

/* ==========================================================
   THEME TOGGLE — TOOLTIP + MICRO ANIMATIONS
========================================================== */

.kn-theme-toggle {
  position: relative;
}

/* press feedback */
.kn-theme-toggle:active {
  transform: scale(0.96);
}

/* tooltip bubble */
.kn-theme-toggle::after {
  content: var(--theme-label);
  position: absolute;
  bottom: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(4px);

  padding: 6px 10px;
  font-size: 0.65rem;
  font-weight: 600;
  white-space: nowrap;

  color: #e5e7eb;
  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 8px;

  opacity: 0;
  pointer-events: none;
  transition: all .18s ease;

  box-shadow:
    0 0 18px rgba(0,0,0,0.35),
    0 0 12px rgba(167,139,250,0.25);
}

/* tooltip arrow */
.kn-theme-toggle::before {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);

  border-width: 6px;
  border-style: solid;
  border-color:
    rgba(15,23,42,0.95) transparent transparent transparent;

  opacity: 0;
  transition: opacity .18s ease;
}

/* show tooltip */
.kn-theme-toggle:hover::after,
.kn-theme-toggle:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* dynamic label */
.theme-dark .kn-theme-toggle {
  --theme-label: "Light mode";
}

.theme-light .kn-theme-toggle {
  --theme-label: "Dark mode";
}

/* pill glow micro animation */
.kn-theme-toggle:hover .kn-theme-pill {
  box-shadow:
    0 0 14px rgba(167,139,250,0.75),
    0 0 28px rgba(167,139,250,0.35);
}


/* =========================================
   LANG SWITCH — UNIFIED (DOCS)
   Match landing / dashboard
========================================= */

.kn-lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.25);
  backdrop-filter: blur(8px);
}

.kn-lang-btn {
  border: none;
  background: transparent;
  color: var(--kn-text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}

/* Hover */
.kn-lang-btn:hover {
  color: var(--kn-green);
}

/* Active = same glow as landing */
.kn-lang-btn.active {
  background: rgba(34, 197, 94, 0.18);
  color: #4ade80;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}


/* --------------------------------------------------------------------------
   PRICE BOX
--------------------------------------------------------------------------- */

.kn-price-box {
  display: flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 600;

  background: rgba(15,23,42,0.85);
  border: 1px solid rgba(112,199,186,0.35);
}

.kas-price-amount {
  color: #70C7BA;
}

.kas-price-change {
  font-size: 0.68rem;
}

.kas-price-change.kn-up { color: #4ade80; }
.kas-price-change.kn-down { color: #f87171; }

.kn-kas-price-icon {
  height: 14px;
  width: 14px;
}

/* --------------------------------------------------------------------------
   INLINE PILLS (Dashboard)
--------------------------------------------------------------------------- */

.kn-inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;

  padding: 6px 12px;
  border-radius: 999px;

  font-size: 0.72rem;
  font-weight: 600;

  background: rgba(15,23,42,0.75);
  border: 1px solid rgba(148,163,184,0.25);
  color: #e5e7eb;
}

.kn-wallet-pill-success {
  border-color: rgba(112,199,186,0.45);
  color: #70C7BA;
}

/* --------------------------------------------------------------------------
   NOTIFICATIONS
--------------------------------------------------------------------------- */

.kn-notif-badge {
  position: absolute;
  top: 6px;
  right: 6px;

  width: 16px;
  height: 16px;
  border-radius: 999px;

  background: #70C7BA;
  color: #020617;

  font-size: 0.65rem;
  font-weight: 700;

  display: flex;
  align-items: center;
  justify-content: center;
}

.kn-notif-dropdown {
  position: absolute;
  right: 0;
  top: 48px;

  width: 320px;
  max-height: 360px;

  background: rgba(15,23,42,0.95);
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 16px;

  overflow: hidden;
  z-index: 1000;
}

/* --------------------------------------------------------------------------
   MOBILE
--------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .kn-nav-links,
  .kn-price-box {
    display: none;
  }
}
/* ======================================================================
   THEME TOGGLE ICONS — FORCE MAUVE (CONSISTENT WITH DASHBOARD)
====================================================================== */

/* état normal : mauve */
.kn-theme-toggle .kn-theme-icon {
  color: #a78bfa; /* mauve KaspaNova */
  stroke: currentColor;
  opacity: 0.9;
}

/* hover : glow mauve */
.kn-theme-toggle:hover .kn-theme-icon {
  color: #c4b5fd;
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(167,139,250,0.7));
}

/* optionnel : quand toggle actif (pill déplacée) */
.theme-dark .kn-theme-toggle .theme-dark-only,
.theme-light .kn-theme-toggle .theme-light-only {
  color: #a78bfa;
}


/* ======================================================================
   AUTH BUTTON ICON — FORCE MAUVE (LOGIN / DASHBOARD)
====================================================================== */

/* bouton texte */
.kn-btn.kn-btn-wallet {
  color: #a78bfa; /* texte clair */
}

/* icône Lucide dans le bouton */
.kn-btn.kn-btn-wallet i {
  color: #a78bfa !important;      /* mauve KaspaNova */
  stroke: currentColor !important;
}

/* hover : glow + cohérence premium */
.kn-btn.kn-btn-wallet:hover i {
  color: #c4b5fd !important;
  filter: drop-shadow(0 0 8px rgba(167,139,250,0.6));
}
/* ==========================================================
   MERCHANT EMAIL PILL — CLEAN / MAUVE
========================================================== */

.kn-merchant-pill {
  border-color: rgba(167,139,250,0.45);
  color: #a78bfa;
  background: rgba(15,23,42,0.75);
}

.kn-merchant-pill i {
  width: 14px;
  height: 14px;
  stroke: #a78bfa;
}

.kn-merchant-pill span {
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.2px;
}
/* ==========================================================
   WALLET ACTIVE PILL — NAVBAR
========================================================== */

.kn-wallet-active-pill {
  border: 1px solid rgba(73,234,203,0.55);
  background: rgba(15,23,42,0.75);
  color: #49EACB;

  box-shadow:
    0 0 14px rgba(73,234,203,0.45),
    inset 0 0 8px rgba(73,234,203,0.15);
}

.kn-wallet-active-pill i {
  width: 14px;
  height: 14px;
  stroke: #a78bfa; /* mauve */
}

.kn-wallet-active-pill span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: .3px;
}
/* ============================================================
   DOCS NAVBAR FIX
============================================================ */

.kn-navbar-docs .kn-navbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.kn-navbar-docs .kn-nav-left {
  justify-self: start;
}

.kn-navbar-docs .kn-nav-center {
  justify-self: center;
}

.kn-navbar-docs .kn-nav-right {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}
/* ==========================================================
   NAV ACTIONS WRAPPER
========================================================== */
.kn-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ==========================================================
   BURGER (mobile)
========================================================== */
.kn-burger {
  background: rgba(112,199,186,0.10);
  border: 1px solid rgba(112,199,186,0.35);
  color: var(--kn-green);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
}

.kn-burger svg {
  width: 20px;
  height: 20px;
}

.kn-burger:hover {
  box-shadow: 0 0 14px rgba(112,199,186,0.35);
  transform: translateY(-1px);
}

/* ==========================================================
   MOBILE DRAWER (transform, no overflow)
========================================================== */
.kn-mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: min(86vw, 360px);
  height: 100dvh;
  background: var(--kn-bg-elevated);
  border-left: 1px solid rgba(148,163,184,0.22);
  padding: 16px;
  z-index: 1200;

  display: flex;
  flex-direction: column;
  gap: 12px;

  transform: translateX(110%);
  transition: transform .25s ease;
  will-change: transform;

  max-width: 100%;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.kn-mobile-menu.open {
  transform: translateX(0);
}

.kn-mobile-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kn-mobile-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 6px rgba(112,199,186,0.35));
}

.kn-mobile-close {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 26px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--kn-border);
  color: var(--kn-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Mobile lang row */
.kn-mobile-lang {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 6px 0 2px;
}

.kn-mobile-sep {
  border-color: var(--kn-border);
  opacity: .6;
  margin: 4px 0 2px;
}

/* Mobile links */
.kn-mobile-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 12px;
}

.kn-mobile-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 12px;
  border-radius: 14px;
  color: var(--kn-text);
  text-decoration: none;
  border: 1px solid transparent;
  background: rgba(15,23,42,0.35);
  transition: all .18s ease;
}

.kn-mobile-link svg {
  width: 18px;
  height: 18px;
  stroke: var(--kn-green);
}

.kn-mobile-link:hover {
  border-color: rgba(112,199,186,0.35);
  background: rgba(112,199,186,0.10);
}

/* ==========================================================
   BACKDROP + SCROLL LOCK
========================================================== */
.kn-mobile-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.kn-mobile-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

body.kn-nav-open {
  overflow: hidden;
}

/* MOBILE hide desktop extras already */
@media (max-width: 768px) {
  .kn-nav-links,
  .kn-price-box {
    display: none !important;
  }

  /* brand slightly bigger than 26px => pro */
  .kn-nav-brand img {
    height: 30px;
  }
}
/* ==========================================================
   THEME TOGGLE — ICON COLOR (SOURCE OF TRUTH)
========================================================== */

.kn-theme-toggle {
  color: #a78bfa; /* mauve KaspaNova */
}

.kn-theme-toggle .kn-theme-icon {
  stroke: currentColor;
  transition: color .2s ease, filter .2s ease;
  opacity: 0.9;
}

.kn-theme-toggle:hover {
  color: #c4b5fd;
}

.kn-theme-toggle:hover .kn-theme-icon {
  filter: drop-shadow(0 0 8px rgba(167,139,250,0.7));
}
/* ==========================================================
   BRAND — NEO ENERGY HOVER (CLEAN / PREMIUM)
========================================================== */

.kn-brand-neo {
  position: relative;
}

/* logo base */
.kn-brand-neo img {
  position: relative;
  z-index: 2;
  transition:
    transform .35s cubic-bezier(.16,1,.3,1),
    filter .35s ease;
}

/* aura énergétique (invisible au repos) */
.kn-brand-neo::before {
  content: "";
  position: absolute;
  inset: -18px;
  z-index: 1;
  pointer-events: none;

  background:
    radial-gradient(
      120px 40px at 20% 50%,
      rgba(112,199,186,.28),
      transparent 60%
    ),
    radial-gradient(
      90px 35px at 80% 40%,
      rgba(167,139,250,.26),
      transparent 60%
    );

  filter: blur(18px);
  opacity: 0;
  transform: translateY(6px) scale(.96);
  transition:
    opacity .35s ease,
    transform .45s cubic-bezier(.16,1,.3,1);
}

/* hover */
.kn-brand-neo:hover img {
  transform: translateY(-1px) scale(1.035);
  filter:
    drop-shadow(0 0 22px rgba(112,199,186,.45))
    drop-shadow(0 0 36px rgba(167,139,250,.28));
}

.kn-brand-neo:hover::before {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* mobile: zéro animation */
@media (max-width: 768px) {
  .kn-brand-neo::before {
    display: none;
  }
}
/* Desktop only – language switch */
.kn-desktop-only {
  display: flex;
}

@media (max-width: 767px) {
  .kn-desktop-only {
    display: none;
  }
}
.kn-lang-btn.active {
  animation: langPulse .35s ease;
}

@keyframes langPulse {
  0%   { transform: scale(.92); }
  60%  { transform: scale(1.06); }
  100% { transform: scale(1); }
}
