/* Components
   - Buttons, chips, cards, toasts, inputs
*/

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.nav-item {
  border-radius: 12px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.14s ease-out, color 0.14s ease-out, transform 0.1s ease-out;
}

.nav-item span.icon {
  width: 22px;
  text-align: center;
  font-size: 16px;
  opacity: 0.85;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(127, 90, 240, 0.14);
  color: var(--text);
  transform: translateY(-1px);
}

.mobile-menu-toggle {
  display: none;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(5, 5, 12, 0.85);
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.mobile-menu-toggle .bar {
  width: 16px;
  height: 2px;
  background: #fff;
  border-radius: 999px;
  display: block;
  margin: 1.5px 0;
}

/* Header brand and right-side widgets */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0, #ffffff, #7f5af0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #050509;
  box-shadow: 0 0 25px rgba(127, 90, 240, 0.65);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.brand-text .title { font-size: 17px; font-weight: 600; letter-spacing: 0.04em; }
.brand-text .subtitle { font-size: 11px; color: var(--text-soft); letter-spacing: 0.08em; text-transform: uppercase; }

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-left: auto;
}

.badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(127, 90, 240, 0.1);
  border: 1px solid rgba(127, 90, 240, 0.4);
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sub-status {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #b8860b, #ffd700, #fff2a8, #ffd700, #b8860b);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmerGold 2.6s linear infinite;
  white-space: nowrap;
}

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

.diamonds {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.diamonds .icon { font-size: 14px; }
.diamonds .count { font-size: 12px; font-weight: 700; }

/* Profile widget */
.profile { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.08); background: rgba(5,5,12,0.7); backdrop-filter: blur(12px); cursor: pointer; position: relative; }
.profile-avatar { width: 28px; height: 28px; border-radius: 999px; background: radial-gradient(circle at 30% 0, #ffffff, #ff6bcb); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; color: #050509; flex-shrink: 0; }
.profile-meta { display: flex; flex-direction: column; gap: 2px; }
.profile-name { font-size: 12px; font-weight: 500; }
.profile-link { font-size: 11px; color: var(--accent); text-decoration: underline; }
.profile-menu { position: absolute; top: calc(100% + 8px); right: 0; min-width: 190px; background: rgba(8, 9, 18, 0.97); border-radius: 14px; border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 18px 40px rgba(0,0,0,0.85); padding: 6px 0; display: none; z-index: 20; }
.profile-menu-item { width: 100%; padding: 8px 14px; font-size: 12px; color: var(--text-soft); background: transparent; border: none; text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 6px; transition: background 0.12s ease-out, color 0.12s ease-out; }
.profile-menu-item span.label { flex: 1; }
.profile-menu-item span.kbd { font-size: 10px; opacity: 0.6; }
.profile-menu-item:hover { background: rgba(127, 90, 240, 0.16); color: var(--text); }
.profile-menu-separator { height: 1px; margin: 4px 8px; background: rgba(255, 255, 255, 0.06); }

@media (min-width: 900px) { .profile { min-width: 150px; } }
@media (max-width: 720px) { body.is-logged-in .profile .profile-meta { display: none; } body.is-logged-in .profile { padding: 4px; } }

/* Subtle footer links under version label (desktop default) */
.footer-links { margin-top: 4px; font-size: 12px; color: var(--text-soft); opacity: 0.9; text-align: center; }
.footer-links .footer-link { color: var(--text-soft); text-decoration: none; opacity: 0.9; margin: 0 2px; }
.footer-links .footer-link:hover { color: var(--text); text-decoration: underline; opacity: 1; }
.footer-links .sep { margin: 0 2px; opacity: 0.5; }

/* Mobile: stack links with larger tap targets */
@media (max-width: 720px) {
  .footer-links { display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0.95; }
  .footer-links .footer-link { margin: 0; padding: 6px 0; }
  .footer-links .sep { display: none; }
}

/* Center footer content */
.nav-footer { text-align: center; }

/* Fancy Save button styling to match gradient sample */
#chat-save-conversation {
  background: linear-gradient(135deg, #7a5cf3 0%, #ff6fd8 100%);
  color: #111;
  border: none;
  border-radius: 14px;
  padding: 10px 18px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(122, 92, 243, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

#chat-save-conversation:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(122, 92, 243, 0.45);
}

#chat-save-conversation:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(122, 92, 243, 0.30);
}

/* Dark theme text color contrast */
.theme-dark #chat-save-conversation {
  color: #0b0b0e;
}
