/*
 * ai-chat-page.css
 * This stylesheet is for the dedicated AI chat page.
 * It adapts styles from chat-widget.css for a full-page layout.
 */

#chat-page-container {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  width: 100%;
  height: 70vh;
  max-height: 700px;
  display: flex;
  flex-direction: column;
}

.chat-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 1.1rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.chat-messages {
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: #f8f9fa;
  flex-grow: 1;
}

.message {
  max-width: 85%;
  padding: 12px 18px;
  border-radius: 16px;
  word-wrap: break-word;
  white-space: pre-wrap;
  animation: slideIn 0.3s ease-out;
  line-height: 1.6;
  font-size: 0.95rem;
}

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

.message.user {
  background: #667eea;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message.bot {
  background: white;
  color: #333;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid #e9ecef;
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.loading-dots {
  display: flex;
  gap: 5px;
  padding: 6px 0;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  background: #999;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.chat-input-area {
  display: flex;
  gap: 12px;
  padding: 20px;
  border-top: 1px solid #e9ecef;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  flex-shrink: 0;
}

#chat-input {
  flex: 1;
  padding: 14px 18px;
  border: 1px solid #dee2e6;
  border-radius: 12px;
  font-size: 1rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#chat-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
}

#chat-send {
  padding: 14px 28px;
  background: #667eea;
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s, transform 0.1s;
  font-size: 1rem;
}

#chat-send:hover {
  background: #5568d3;
}

#chat-send:active {
  transform: scale(0.98);
}

#chat-send:disabled {
  background: #b0b8e2;
  cursor: not-allowed;
}

/* スクロールバーのスタイリング */
.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #f1f3f5;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #d4dae0;
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #c8ced5;
}
