/* Chat Page Styles - Modern Design */

:root {
  --chat-bg: #f8f9fc;
  --chat-surface: #ffffff;
  --chat-primary: #f97316;
  --chat-primary-hover: #ea580c;
  --chat-border: #e4e9f2;
  --chat-border2: #cbd5e1;
  --chat-text: #1a2340;
  --chat-text2: #475569;
  --chat-text3: #94a3b8;
  --chat-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --chat-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --user-msg-bg: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  --bot-msg-bg: #f1f5f9;
}
* {
  box-sizing: border-box;
}
.chat-page {
  min-height: 100vh;
  background: var(--chat-bg);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.chat-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 80px);
}

.chat-header {
  background: var(--chat-surface);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--chat-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.chat-header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--chat-text);
  margin: 0;
}

.chat-header-subtitle {
  font-size: 13px;
  color: var(--chat-text3);
  margin: 0;
}

.chat-model-selector {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-model-selector label {
  font-size: 13px;
  font-weight: 600;
  color: var(--chat-text2);
}

.chat-model-selector select {
  padding: 8px 14px;
  border: 1px solid var(--chat-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--chat-text);
  background: var(--chat-surface);
  cursor: pointer;
  transition: all 0.2s;
  min-width: 180px;
}

.chat-model-selector select:hover {
  border-color: var(--chat-primary);
}

.chat-model-selector select:focus {
  outline: none;
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.chat-messages-container {
  flex: 1;
  background: var(--chat-surface);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--chat-shadow);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages-container::-webkit-scrollbar {
  width: 8px;
}

.chat-messages-container::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages-container::-webkit-scrollbar-thumb {
  background: var(--chat-border2);
  border-radius: 4px;
}

.chat-messages-container::-webkit-scrollbar-thumb:hover {
  background: var(--chat-text3);
}

.chat-message {
  display: flex;
  align-items: end;
  gap: 12px;
  animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message.user {
  flex-direction: row-reverse;
}

.chat-message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.chat-message.user .chat-message-avatar {
  background: var(--user-msg-bg);
  color: white;
}

.chat-message.bot .chat-message-avatar {
  background: var(--bot-msg-bg);
  color: var(--chat-text);
}

.chat-message-content {
  max-width: 70%;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.6;
  word-wrap: break-word;
}

.chat-message.user .chat-message-content {
  background: var(--user-msg-bg);
  color: white;
  border-bottom-right-radius: 4px;
}

.chat-message.bot .chat-message-content {
  background: var(--bot-msg-bg);
  color: var(--chat-text);
  border-bottom-left-radius: 4px;
}

.chat-message.bot .chat-message-content.thinking {
  font-style: italic;
  color: var(--chat-text3);
}

.chat-input-area {
  background: var(--chat-surface);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--chat-shadow);
}

.chat-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: center;
}

.chat-input-field {
  flex: 1;
  position: relative;
}

.chat-input-field textarea {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid var(--chat-border);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--chat-text);
  background: var(--chat-bg);
  resize: none;
  transition: all 0.2s;
  min-height: 52px;
  max-height: 150px;
}

.chat-input-field textarea:focus {
  outline: none;
  border-color: var(--chat-primary);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.chat-input-field textarea::placeholder {
  color: var(--chat-text3);
}

.chat-send-btn {
  padding: 14px 28px;
  background: var(--chat-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.chat-send-btn:hover:not(:disabled) {
  background: var(--chat-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
}

.chat-send-btn:active:not(:disabled) {
  transform: translateY(0);
}

.chat-send-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.chat-send-btn svg {
  width: 18px;
  height: 18px;
}

.chat-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--chat-text3);
  text-align: center;
}

.chat-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.chat-empty-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--chat-text2);
  margin-bottom: 8px;
}

.chat-empty-subtitle {
  font-size: 14px;
  color: var(--chat-text3);
}

/* Responsive */
@media (max-width: 768px) {
  .chat-wrapper {
    padding: 16px;
  }
  
  .chat-header {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }
  
  .chat-message-content {
    max-width: 85%;
  }
  
  .chat-input-wrapper {
    flex-direction: column;
  }
  
  .chat-send-btn {
    width: 100%;
    justify-content: center;
  }
}
