/**
 * Estilos para funcionalidade de chat
 * Estiliza os modais de opções de chat e seleção de documentos
 */

/* Estilos para opções de chat */
.chat-options {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin: 20px 0;
}

.chat-option {
  display: flex;
  align-items: flex-start;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.chat-option:hover {
  border-color: #6a5acd;
  background-color: rgba(106, 90, 205, 0.05);
}

.chat-option.selected {
  border-color: #6a5acd;
  background-color: rgba(106, 90, 205, 0.1);
  box-shadow: 0 2px 8px rgba(106, 90, 205, 0.2);
}

.chat-option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  background-color: #6a5acd;
  color: white;
  border-radius: 50%;
  margin-right: 15px;
  font-size: 20px;
}

.chat-option-content {
  flex: 1;
}

.chat-option-content h4 {
  margin: 0 0 5px 0;
  font-size: 16px;
  color: #333;
}

.chat-option-content p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

/* Estilos para seleção de documentos */
.documents-selection {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

.document-type-section {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
}

.document-type-section h4 {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: #333;
  display: flex;
  align-items: center;
}

.document-type-section h4 i {
  margin-right: 8px;
  color: #6a5acd;
}

.document-list {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 6px;
}

.document-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.document-item:last-child {
  border-bottom: none;
}

.document-item:hover {
  background-color: #f9f9f9;
}

.document-item.selected {
  background-color: rgba(106, 90, 205, 0.1);
}

.document-item-content {
  flex: 1;
}

.document-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 3px;
}

.document-item-meta {
  font-size: 12px;
  color: #777;
}

.document-item-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 4px;
  position: relative;
}

.document-item.selected .document-item-checkbox {
  border-color: #6a5acd;
  background-color: #6a5acd;
}

.document-item.selected .document-item-checkbox::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 12px;
}

.no-documents {
  padding: 20px;
  text-align: center;
  color: #777;
}

.no-documents i {
  font-size: 24px;
  margin-bottom: 10px;
  color: #ccc;
}

.no-documents p {
  margin: 0;
  font-size: 14px;
}

/* Estilos para chats anteriores */
.chat-item .document-item-title {
  display: flex;
  align-items: center;
  gap: 5px;
}

.chat-item .document-item-title i {
  color: #6a5acd;
  font-size: 14px;
}

.chat-item.selected {
  background-color: rgba(106, 90, 205, 0.1);
  border-left: 3px solid #6a5acd;
}

/* Estilos para documentos selecionados */
.selected-documents {
  margin-top: 20px;
}

.selected-documents h4 {
  margin: 0 0 10px 0;
  font-size: 15px;
  color: #333;
}

.selected-list {
  border: 1px solid #eee;
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.selected-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 15px;
  border-bottom: 1px solid #eee;
}

.selected-item:last-child {
  border-bottom: none;
}

.selected-item-content {
  flex: 1;
}

.selected-item-title {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  margin-bottom: 3px;
}

.selected-item-type {
  font-size: 12px;
  color: #777;
}

.remove-selected-btn {
  background: none;
  border: none;
  color: #ff4757;
  cursor: pointer;
  font-size: 16px;
  padding: 5px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

.remove-selected-btn:hover {
  background-color: rgba(255, 71, 87, 0.1);
}

.no-selection {
  padding: 20px;
  text-align: center;
  color: #777;
}

.no-selection i {
  font-size: 24px;
  margin-bottom: 10px;
  color: #ccc;
}

.no-selection p {
  margin: 0;
  font-size: 14px;
}

/* Estilos para indicadores de carregamento */
.loading-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.loading-indicator .spinner {
  width: 30px;
  height: 30px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #6a5acd;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 10px;
}

.loading-indicator p {
  margin: 0;
  font-size: 14px;
  color: #666;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Estilos para mensagens de erro */
.error-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #ff4757;
}

.error-message i {
  font-size: 24px;
  margin-bottom: 10px;
}

.error-message p {
  margin: 0;
  font-size: 14px;
}

/* Responsividade */
@media (min-width: 768px) {
  .chat-options {
    flex-direction: row;
  }
  
  .chat-option {
    flex: 1;
  }
  
  .documents-selection {
    flex-direction: row;
  }
  
  .document-type-section {
    flex: 1;
  }
}
