/* ── Buddy Navigation Fix ─────────────────────────────── */

/* 1. On mobile (≤680px) hide overflow-able topbar items;
      show the ⋯ trigger instead */
@media (max-width: 680px) {
  .topbar-overflowable {
    display: none !important;
  }
  .btn-overflow-trigger {
    display: flex !important;
  }
}

/* 2. On desktop, always show topbar items, hide ⋯ */
@media (min-width: 681px) {
  .topbar-overflowable {
    display: flex !important;
  }
  .topbar-overflow-wrap {
    display: none !important;
  }
}

/* 3. Overflow dropdown styling */
.topbar-overflow-wrap {
  position: relative;
}

.btn-overflow-trigger {
  display: none; /* shown via media query above */
}

.overflow-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #131a21;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 6px;
  min-width: 180px;
  z-index: 9999;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  display: none;
}

.overflow-dropdown.open {
  display: block;
}

.overflow-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
  border: none;
  color: #8a96a2;
  padding: 10px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.overflow-dropdown button:hover {
  background: rgba(255,255,255,0.06);
  color: #e8edf2;
}

.overflow-divider {
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 4px 0;
}

.overflow-scrim.active {
  position: fixed;
  inset: 0;
  z-index: 9998;
}

/* 4. Mode bar — cleaner on mobile */
@media (max-width: 480px) {
  .mode-bar {
    padding: 8px 12px;
    gap: 6px;
  }
  .mode-btn span {
    display: none;
  }
  .mode-btn {
    padding: 6px 10px;
  }
}

/* 5. Topbar label text hidden on mobile */
@media (max-width: 680px) {
  .btn-label {
    display: none;
  }
}

/* 6. Streaming indicator — make it visible */
.typing span {
  width: 8px !important;
  height: 8px !important;
  background: var(--teal, #2C95B0) !important;
}

/* 7. Composer safe area on iOS */
.composer {
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0)) !important;
}

/* 8. Chat messages — better mobile spacing */
@media (max-width: 480px) {
  .msg .bubble {
    max-width: 96% !important;
    font-size: 14px !important;
  }
}

/* 9. Drawer full-height on mobile */
@media (max-width: 680px) {
  .drawer {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* 10. Active nav button highlight */
.icon-btn.nav-active {
  color: var(--teal, #2C95B0) !important;
  background: rgba(44, 149, 176, 0.12) !important;
}
