/* ── Nav links ──────────────────────────────────────────── */
.navbar {
  background: var(--grad-header);
  height: 68px;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
/* XS -> MD*/
@media (max-width: 991px) {
  .navbar {
    height: 100%;
  }
}

/* LG -> XXL*/
@media (min-width: 992px) {
  .qa-nav-link--outline {
    border: 1.5px solid rgba(255, 255, 255, 0.35);
  }

  .qa-nav-link--outline:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.7);
  }

  .navbar {
    padding: 0 10px;
  }
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e")
}

.nav-item {
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  transition:
    background 150ms,
    color 150ms;
  white-space: nowrap;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: inherit !important;
}

.nav-link {
  color: var(--text-primary);
}

.nav-link:hover {
  color: inherit !important;
}

.nav-link i {
  color: rgba(255, 255, 255, 0.82);
}

li.nav-item:not(.qa-nav-link--outline) {
  padding-right: 12px;
}

.qa-header__nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
}

.qa-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 8px;
  transition:
    background 150ms,
    color 150ms;
  white-space: nowrap;
}

.qa-nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.qa-nav-link--danger {
  color: rgba(255, 160, 160, 0.9);
}

.qa-nav-link--danger:hover {
  background: rgba(239, 68, 68, 0.15);
}

[data-qa-theme="bright-playful"] .qa-nav-link--danger:hover {
  background: rgba(255, 255, 255, 0.1);
}

.qa-nav-link--danger i {
  color: #fca5a5;
}



/* ── Theme selector ─────────────────────────────────────── */
.qa-theme-selector {
  position: relative;
  margin-left: 6px;
}

.qa-theme-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.1);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  cursor: pointer;
  font-size: 17px;
  transition:
    background 150ms,
    transform 200ms;
}

.qa-theme-trigger:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: scale(1.06);
}

.qa-theme-trigger[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.qa-theme-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 214px;
  background: var(--bg-card, #1d2040);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.1));
  border-radius: 14px;
  padding: 6px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.65),
    0 4px 12px rgba(0, 0, 0, 0.4);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: qa-pop-in 0.18s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.qa-theme-panel[hidden] {
  display: none !important;
}

.qa-theme-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 9px;
  cursor: pointer;
  transition:
    background 150ms,
    color 150ms;
  font-family: inherit;
}

.qa-theme-option:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.qa-theme-option.active {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.qa-theme-option:focus-visible {
  outline: 2px solid var(--brand-light, #9b6dff);
  outline-offset: 1px;
}

.qa-theme-option__swatch {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  flex-shrink: 0;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
}

/* Bright Playful: panel needs light background */
[data-qa-theme="bright-playful"] .qa-theme-panel {
  background: #fff;
  border-color: rgba(124, 58, 237, 0.15);
  box-shadow: 0 16px 48px rgba(100, 60, 200, 0.22);
}

[data-qa-theme="bright-playful"] .qa-theme-option {
  color: rgba(26, 0, 64, 0.75);
}

[data-qa-theme="bright-playful"] .qa-theme-option:hover {
  background: rgba(124, 58, 237, 0.08);
  color: #1a0040;
}

[data-qa-theme="bright-playful"] .qa-theme-option.active {
  background: rgba(124, 58, 237, 0.13);
  color: #1a0040;
}

/* Mobile nav */
@media (max-width: 768px) {
  .qa-nav-link span {
    display: none;
  }

  .qa-header__title {
    font-size: 1rem;
  }

  .qa-header__nav {
    gap: 2px;
  }

  .qa-nav-link {
    padding: 6px;
    font-size: 1.2rem;
    min-width: 40px;
    min-height: 40px;
    justify-content: center;
  }

  /* Ocultar links secundarios en móvil para evitar desbordamiento */
  .qa-nav-link--hide-mobile {
    display: none;
  }

  .qa-theme-selector {
    margin-left: 2px;
  }

  .qa-theme-trigger {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}

/* ── Toggle Theme ─────────────────────────────────────── */
.span-midnight-arena {
  background: linear-gradient(135deg, #7c3aed, #0b0d1a);
}

.span-bright-playful {
  background: linear-gradient(135deg, #ff5c00, #ede9fe);
}
