/* 
 * Chat Animation Styles for telet.ai
 * Pure CSS implementation without dependencies
 */

.chat-animation-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: transparent;
  border-radius: 15px;
}

.chat-messages-container {
  width: 100%;
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 20px;
}

/* チャットメッセージスタイル */
.chat-message {
  width: 100%;
  display: flex;
  opacity: 0;
  transform: translateX(30px);
  transition: all 0.7s ease-out;
}

.chat-message.user {
  justify-content: flex-end;
  transform: translateX(30px);
}

.chat-message.customer {
  justify-content: flex-start;
  transform: translateX(-30px);
}

.chat-message.show {
  opacity: 1;
  transform: translateX(0);
}

/* チャットバブルスタイル */
.chat-bubble {
  max-width: 80%;
  padding: 15px 20px;
  border-radius: 20px;
  font-size: 16px;
  line-height: 1.5;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  word-wrap: break-word;
  position: relative;
}

/* ユーザーメッセージ（右側、緑色） */
.chat-message.user .chat-bubble {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  border-bottom-right-radius: 5px;
}

.chat-message.user .chat-bubble::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: -8px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-left-color: #059669;
  border-bottom: none;
  transform: rotate(45deg);
}

/* カスタマーメッセージ（左側、グレー） */
.chat-message.customer .chat-bubble {
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  color: #1F2937;
  border-bottom-left-radius: 5px;
  border: 1px solid #D1D5DB;
}

.chat-message.customer .chat-bubble::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: -8px;
  width: 0;
  height: 0;
  border: 8px solid transparent;
  border-right-color: #E5E7EB;
  border-bottom: none;
  transform: rotate(-45deg);
}

/* ダークモード対応 - 色を付けない */
@media (prefers-color-scheme: dark) {
  .chat-animation-wrapper {
    background: transparent;
  }
  
  .chat-message.customer .chat-bubble {
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    color: #1F2937;
  }
  
  .chat-message.customer .chat-bubble::after {
    border-right-color: #E5E7EB;
  }
}

/* レスポンシブデザイン */
@media (max-width: 768px) {
  .chat-animation-wrapper {
    padding: 15px;
    min-height: 350px;
  }
  
  .chat-bubble {
    font-size: 14px;
    padding: 12px 16px;
    max-width: 85%;
  }
  
  .contact-btn {
    padding: 12px 24px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .chat-animation-wrapper {
    padding: 10px;
    min-height: 300px;
  }
  
  .chat-bubble {
    font-size: 13px;
    padding: 10px 14px;
    max-width: 90%;
  }
  
  .chat-messages-container {
    gap: 15px;
  }
}

/* アニメーション効果の強化 */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* スムーズスクロール対応 */
@media (prefers-reduced-motion: reduce) {
  .chat-message {
    transition: none;
  }
  
  .chat-message.show {
    opacity: 1;
    transform: none;
  }
}
