@media screen and (max-width: 768px) {
  :root {
    --sidebar-w: 0px;
  }
  #sidebar {
    position: fixed;
    left: -100%;
    width: 268px !important;
    height: 100vh;
    z-index: 999;
    transform: translateY(-122px);
    transition: left 0.3s ease;
    background: var(--bg-sidebar);
    box-shadow: 10px 0 20px rgba(0, 0, 0, 0.1);
  }
  #sidebar.mobile-active {
    left: 0;
  }
  .viewport {
    width: 100vw;
    min-width: 100vw;
  }
  .header-bar {
    padding: 0 16px;
  }
  .logo-text {
    font-size: 1.3rem;
  }
  #chat-container {
    padding: 0 12px;
  }
  .composer {
    width: 95% !important;
    max-width: none;
    margin-bottom: 8px;
  }
  .user-bubble {
    max-width: 90%;
  }
  .search-modal {
    width: min(94vw, 680px);
    max-height: 86vh;
  }
}

#sidebar .material-symbols-rounded {
  font-variation-settings:
    "FILL" 0,
    "wght" 350,
    "GRAD" 0,
    "opsz" 24;
}

.menu-toggle .material-symbols-rounded {
  font-size: 24px;
  font-variation-settings:
    "FILL" 0,
    "wght" 275,
    "GRAD" 0,
    "opsz" 28 !important;
}

#searchToggleBtn .material-symbols-rounded {
  transform: translateX(-1px) !important;
}

button:hover *,
a:hover *,
.nav-link:hover *,
.chat-more-btn:hover *,
.menu-toggle:hover *,
.search-toggle-btn:hover *,
.btn:hover *,
.btn-tools:hover *,
.btn-action-plus:hover *,
.tools-menu-item:hover *,
.chat-context-item:hover *,
.modal-btn-secondary:hover *,
.modal-btn-primary:hover *,
.sidebar-login-btn:hover *,
.sidebar-profile-btn:hover *,
.sidebar-user-menu-item:hover * {
  cursor: pointer !important;
}

.floating-response-toast {
  position: fixed;
  top: 16px;
  right: 16px;
  left: auto;
  width: 280px;
  min-height: 56px;
  max-height: 140px;
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16);
  padding: 12px 40px 12px 14px;
  z-index: 30000;
  cursor: pointer;
  overflow: hidden;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.floating-response-toast:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.18);
}

.floating-response-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1f1f1f;
  margin-bottom: 4px;
}

.floating-response-text {
  font-size: 0.84rem;
  color: #444746;
  line-height: 1.35;
  max-height: 42px;
  overflow: hidden;
}

.floating-response-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-header {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 10px 0 10px;
}

#sidebar.collapsed .sidebar-brand-btn {
  transform: translateX(-1px);
}

#sidebar.collapsed .sidebar-brand-btn {
  width: 40px;
  min-width: 40px;
}

#sidebar.collapsed .menu-toggle {
  display: none;
}

#sidebar.collapsed .sidebar-mini-brand {
  display: inline-flex;
}

#sidebar.collapsed .sidebar-brand-btn .sidebar-toggle-icon {
  display: none;
}

#sidebar.collapsed:hover .sidebar-mini-brand {
  display: none;
}

#sidebar.collapsed:hover .sidebar-brand-btn .sidebar-toggle-icon {
  display: inline-flex;
}

.menu-toggle,
.sidebar-brand-btn {
  width: 40px;
  height: 40px;
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-brand-btn:focus,
.sidebar-brand-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.sidebar-mini-brand {
  display: inline-flex;
  font-size: 1.35rem;
  font-weight: 800;
  color: #000000;
  line-height: 1;
}

.sidebar-brand-btn .sidebar-toggle-icon {
  display: none !important;
}

#sidebar.collapsed .sidebar-header {
  justify-content: center;
  padding: 14px 0 0 0;
}

#sidebar.collapsed .sidebar-mini-brand {
  display: inline-flex !important;
}

#sidebar.collapsed:hover .sidebar-mini-brand {
  display: none !important;
}

#sidebar.collapsed:hover .sidebar-brand-btn .sidebar-toggle-icon {
  display: inline-flex !important;
}

.floating-response-title {
  font-weight: 700;
  font-size: 0.9rem;
  color: #1f1f1f;
  margin-bottom: 6px;
}

.floating-response-text {
  font-size: 0.86rem;
  color: #444746;
  line-height: 1.35;
  max-height: 110px;
  overflow: hidden;
}

.floating-response-close {
  position: absolute;
  top: 6px;
  right: 8px;
  border: none;
  background: transparent;
  font-size: 20px;
  cursor: pointer;
}

.sidebar-user-menu-wrap {
  left: 26px;
  transform: translateX(-50%);
}

#sidebar.collapsed .sidebar-user-menu-wrap {
  left: 50%;
  transform: translateX(-50%);
}

#searchToggleBtn {
  position: relative;
  box-sizing: border-box;
  width: calc(100% - 6px);
  margin-left: 0;
  margin-right: 6px;
  height: 38px;
  margin-top: 2px;
  padding-left: 10px !important;
  padding-right: 12px;
  overflow: hidden;
  transition:
    width 0.2s var(--ease),
    margin-right 0.2s var(--ease),
    padding 0.2s var(--ease),
    background-color 0.2s var(--ease);
}

#sidebar.collapsed #searchToggleBtn {
  width: calc(100% - 8px);
  margin-left: 0;
  margin-right: 4px;
  padding-left: 16px !important;
  padding-right: 12px;
}

#searchToggleBtn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: transparent;
  z-index: -1;
}

#searchToggleBtn:hover,
#searchToggleBtn.active {
  background: transparent !important;
}

#searchToggleBtn:hover::before,
#searchToggleBtn.active::before {
  background: rgba(0, 0, 0, 0.04);
}

#searchToggleBtn .material-symbols-rounded {
  transform: translateX(-1px) !important;
}

.menu-toggle .material-symbols-rounded,
.sidebar-brand-btn .sidebar-toggle-icon {
  font-size: 24px !important;
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 28 !important;
}

.history-label span:first-child {
  margin-left: 2px;
}

#newChatBtn {
  padding-left: 6px !important;
}

#newChatBtn .material-symbols-rounded {
  transform: translateX(-1px) !important;
}

.model-picker-wrap {
  position: relative;
}

.provider-picker-menu {
  min-width: 150px;
}

.model-picker-btn {
  height: 32px;
  padding: 0 7px 0 9px;
  border: none;
  outline: none;
  box-shadow: none;
  background: transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 600;
  color: #1f1f1f;
}

.model-picker-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.model-picker-btn:focus,
.model-picker-btn:focus-visible {
  outline: none;
  box-shadow: none;
}

.model-picker-current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#selectedProviderLabel,
#selectedModelLabel {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#selectedProviderLabel {
  max-width: 74px;
}

#selectedModelLabel {
  max-width: 128px;
}

.model-picker-badge {
  width: 24px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  flex-shrink: 0;
}

.badge-chatgpt {
  background: #111111;
}

.badge-kimi {
  background: #5b7cff;
}

.badge-claude {
  background: #d97706;
}

.badge-grok {
  background: #111111;
}

.badge-gemini {
  background: #7c3aed;
}

.badge-deepseek {
  background: #2563eb;
}

.badge-custom {
  background: #8a6b3f;
}

.model-picker-arrow {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  font-size: 18px !important;
  line-height: 1;
  transform: rotate(0deg);
  transform-origin: center;
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.model-picker-btn.open .model-picker-arrow {
  transform: rotate(180deg);
}
