
/* Chat Interface Styles */
.chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 600px;
  height: 400px;
  min-width: 300px;
  min-height: 300px;
  max-width: 80vw;
  max-height: 80vh;
  background-color: white;
  border: 1px solid #ccc;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  resize: both;
  overflow: hidden;
}

.chat-header {
  background-color: #f8f9fa;
  padding: 10px 15px;
  border-bottom: 1px solid #dee2e6;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h6 {
  margin: 0;
  font-weight: 600;
}

.chat-toggle {
  background: none;
  border: none;
  font-size: 1.2em;
  cursor: pointer;
  color: #6c757d;
}

.chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
  background-color: #f8f9fa;
}

.chat-message {
  margin-bottom: 4px;
  padding: 8px 12px;
  border-radius: 15px;
  max-width: 98%;
  word-wrap: break-word;
}

.chat-message.user {
  background-color: #60dfbb3f;
  color: #222;
  margin-left: 5%;
  border: 1px solid #dee2e6;
  border-bottom-right-radius: 5px;
}

.chat-message.assistant {
  background-color: white;
  color: #222;
  border: 1px solid #dee2e6;
  border-bottom-left-radius: 5px;
}

.chat-message.system {
  background-color: white;
  color: #F00;
  font-weight: bold;
  border: 1px solid #dee2e6;
  border-bottom-left-radius: 5px;
}

.chat-input-container {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  padding: 0;
  border-top: 1px solid #dee2e6;
  background-color: white;
  border-radius: 0 0 10px 10px;
}

.chat-input-row {
  display: flex;
  padding-left: 80px;
  gap: 8px;
  width: 100%;
}

.chat-input {
  flex: 1;
  border: 1px solid #ced4da;
  border-radius: 20px;
  padding: 8px 15px;
  width: 100%;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.4;
  max-height: 100px;
  min-height: 38px;
}

.chat-input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.chat-input-witch-notebook {
  height: 80px;
  width: auto;
  cursor: pointer;
  position: absolute;
  bottom: -14px;
  left: -7px;
}

.chat-controls {
  display: flex;
  gap: 5px;
}

.chat-minimized {
  height: 30px;
  min-height: 30px;
  bottom: 0;
}

.chat-minimized .chat-body,
.chat-minimized .chat-input-container {
  display: none;
}

/* Resize handle */
.chat-resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  width: 15px;
  height: 15px;
  cursor: se-resize;
  background: linear-gradient(-45deg, transparent 30%, #ccc 30%, #ccc 40%, transparent 40%, transparent 60%, #ccc 60%, #ccc 70%, transparent 70%);
  border-radius: 0 0 10px 0;
  z-index: 1001;
}

.chat-resize-handle:hover {
  background: linear-gradient(-45deg, transparent 30%, #999 30%, #999 40%, transparent 40%, transparent 60%, #999 60%, #999 70%, transparent 70%);
}

.chat-minimized .chat-resize-handle {
  display: none;
}

@media (max-width: 768px) {
  .chat-input-witch-notebook {
    display: none;
  }
  .chat-input-row {
    padding-left: 0;
  }
  .scroll-btn {
    display: none;
  }
}
