/* ══════════════════════════════════════════
   chat-history-extras.css

   ══════════════════════════════════════════ */

.hist-menu-btn {
  display: none;            
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: background .15s, color .15s;
  padding: 0;
  margin-right: auto;
}
.hist-item:hover .hist-menu-btn,
.hist-item.active .hist-menu-btn {
  display: flex;
}
.hist-menu-btn:hover {
  background: var(--bg-hover, rgba(0,0,0,.08));
  color: var(--text-primary);
}

.chat-ctx-menu {
  background: var(--bg-secondary, #fff);
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
  padding: 4px;
  min-width: 160px;
  animation: ctxFadeIn .12s ease;
}
@keyframes ctxFadeIn {
  from { opacity:0; transform: translateY(-4px); }
  to   { opacity:1; transform: translateY(0); }
}
.chat-ctx-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  border-radius: 7px;
  cursor: pointer;
  text-align: right;
  transition: background .12s;
  direction: rtl;
}
.chat-ctx-menu button:hover {
  background: var(--bg-hover, rgba(0,0,0,.06));
}
.chat-ctx-menu button.danger {
  color: #ef4444;
}
.chat-ctx-menu button.danger:hover {
  background: rgba(239,68,68,.08);
}
.chat-ctx-menu button i {
  font-size: 15px;
  flex-shrink: 0;
}

.hist-rename-input {
  flex: 1;
  min-width: 0;
  background: var(--bg-secondary, #f3f4f6);
  border: 1px solid var(--accent, #6366f1);
  border-radius: 5px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: inherit;
  padding: 1px 6px;
  outline: none;
  direction: rtl;
}
