/* ===================================
   CHAT MODAL MODULE
   =================================== */

.chat-history-window {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  max-width: 90vw;
  height: 400px;
  max-height: 80vh;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 15px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
}

.chat-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  border-radius: 12px 12px 0 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.chat-history-content {
  flex: 1;
  padding: 1rem;
  overflow-y: auto;
  background: rgba(248, 249, 250, 0.8);
  border-radius: 0;
  max-height: calc(400px - 120px);
  font-family: var(--font-mono-extended);
}

.chat-entry {
  margin-bottom: 0.5rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  border-left: 3px solid #667eea;
  transition: all 0.2s ease;
  font-family: var(--font-mono-extended);
}

.chat-entry:hover {
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(2px);
}

.chat-time {
  color: #666;
  font-size: 0.8rem;
  margin-right: 0.5rem;
  font-weight: normal;
  font-family: var(--font-mono-extended);
}

.chat-message {
  color: #333;
  font-weight: bold;
  font-family: var(--font-mono-extended);
}

.no-history {
  text-align: center;
  color: #999;
  font-style: italic;
  margin: 2rem 0;
  font-family: var(--font-mono-extended);
}

.chat-history-footer {
  padding: 0.8rem 1rem;
  background: rgba(240, 240, 240, 0.9);
  border-radius: 0 0 12px 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.9rem;
  color: #666;
  text-align: center;
  font-family: var(--font-mono-extended);
}

.chat-history-footer span {
  color: #667eea;
  font-weight: bold;
}

/* Scrollbar styling for chat history */
.chat-history-content::-webkit-scrollbar {
  width: 8px;
}

.chat-history-content::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}

.chat-history-content::-webkit-scrollbar-thumb {
  background: linear-gradient(45deg, #667eea, #764ba2);
  border-radius: 4px;
}

.chat-history-content::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(45deg, #5a6fd8, #6a4190);
}
