/**
 * Chat History Dropdown Styles
 */

.chat-dropdown-wrapper {
  position: relative;
  width: 100%;
}

.chat-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #e5e7eb;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 6px;
  text-align: left;
}

.chat-dropdown-trigger:hover {
  background: rgba(99, 102, 241, 0.1);
  color: #818cf8;
}

.chat-dropdown-trigger.active {
  background: rgba(99, 102, 241, 0.2);
  color: #818cf8;
}

.dropdown-arrow {
  font-size: 10px;
  transition: transform 0.2s ease;
  margin-left: 8px;
}

.chat-dropdown-trigger.active .dropdown-arrow {
  transform: rotate(180deg);
}

.chat-dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #1e1e1e;
  border: 1px solid #374151;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 4px;
}

.dropdown-section {
  padding: 4px 0;
}

.dropdown-header {
  padding: 8px 16px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: #6b7280;
  letter-spacing: 0.5px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  color: #e5e7eb;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 13px;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(99, 102, 241, 0.1);
}

.dropdown-item.active {
  background: rgba(99, 102, 241, 0.2);
  border-left: 3px solid #6366f1;
}

.dropdown-action {
  font-weight: 500;
  color: #818cf8;
}

.dropdown-action .icon {
  margin-right: 10px;
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.dropdown-divider {
  height: 1px;
  background: #374151;
  margin: 4px 0;
}

.chat-item {
  position: relative;
  padding-right: 80px;
}

.chat-icon {
  margin-right: 10px;
  font-size: 14px;
  width: 20px;
  text-align: center;
}

.chat-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-badge {
  margin-left: 6px;
  color: #fbbf24;
  font-size: 12px;
}

.chat-actions {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: none;
  gap: 4px;
}

.chat-item:hover .chat-actions {
  display: flex;
}

.action-btn {
  background: transparent;
  border: none;
  color: #6b7280;
  cursor: pointer;
  padding: 4px;
  font-size: 12px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #e5e7eb;
}

.action-btn.delete-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.dropdown-empty {
  padding: 24px 16px;
  text-align: center;
  color: #6b7280;
}

.dropdown-empty p {
  margin: 0;
}

.dropdown-empty .hint {
  font-size: 12px;
  margin-top: 4px;
  color: #4b5563;
}

.new-chat-btn {
  color: #818cf8;
  font-weight: 500;
}

.new-chat-btn:hover {
  background: rgba(99, 102, 241, 0.15);
}

/* Scrollbar styling */
.chat-dropdown-menu::-webkit-scrollbar {
  width: 6px;
}

.chat-dropdown-menu::-webkit-scrollbar-track {
  background: transparent;
}

.chat-dropdown-menu::-webkit-scrollbar-thumb {
  background: #4b5563;
  border-radius: 3px;
}

.chat-dropdown-menu::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .chat-dropdown-menu {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 60vh;
    border-radius: 16px 16px 0 0;
    margin-top: 0;
  }
}
