/* AI Chatbot Styles */
/* 토글 버튼 숨김 - 폼 제출 후에만 채팅 가능 */
.chatbot-toggle {
  display: none !important;
}

.chatbot-window {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #fdfcfb;
  border-radius: 0;
  box-shadow: none;
  z-index: 9998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: all 0.3s ease;
}
.chatbot-window.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.chatbot-header {
  background: linear-gradient(135deg, #6b5444 0%, #8b7355 100%);
  color: white;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'Cormorant', serif;
  font-size: 18px;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chatbot-header::before {
  content: '✧';
  font-size: 14px;
  opacity: 0.7;
}

.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chatbot-messages::-webkit-scrollbar {
  width: 4px;
}
.chatbot-messages::-webkit-scrollbar-thumb {
  background: #d4c8be;
  border-radius: 4px;
}

.chat-message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 16px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  animation: chatFadeIn 0.3s ease;
}
@keyframes chatFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-message.bot {
  background: #f5f0eb;
  color: #4a4a4a;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.chat-message.user {
  background: linear-gradient(135deg, #6b5444 0%, #8b7355 100%);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}
.chat-message.typing {
  display: flex;
  gap: 4px;
  padding: 16px 20px;
}
.chat-message.typing span {
  width: 6px;
  height: 6px;
  background: #a89585;
  border-radius: 50%;
  animation: chatTyping 1.2s infinite;
}
.chat-message.typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-message.typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes chatTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.chatbot-input-area {
  padding: 12px 16px;
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid #ebe5df;
  display: flex;
  gap: 10px;
  background: white;
  flex-shrink: 0;
}
.chatbot-input {
  flex: 1;
  border: 1px solid #e5ddd5;
  border-radius: 18px;
  padding: 10px 16px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 16px; /* iOS 자동 줌 방지 */
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  min-height: 20px;
  max-height: 80px;
  line-height: 1.4;
}
.chatbot-input:focus {
  border-color: #6b5444;
}
.chatbot-input::placeholder {
  color: #b5a99d;
}
.chatbot-send {
  padding: 12px 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, #6b5444 0%, #8b7355 100%);
  border: none;
  cursor: pointer;
  color: white;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s;
}
.chatbot-send:hover {
  transform: scale(1.05);
}
.chatbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.chatbot-send svg {
  width: 18px;
  height: 18px;
  fill: white;
}

/* 예약 안내 고정 메시지 */
.chat-notice {
  background: #fef3f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 10px 14px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  margin-bottom: 8px;
}

/* 빠른 응답 버튼 */
.quick-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
.quick-reply-btn {
  background: white;
  border: 1px solid #d4c8be;
  border-radius: 20px;
  padding: 10px 16px;
  font-family: 'Noto Sans KR', sans-serif;
  font-size: 13px;
  color: #6b5444;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s;
}
.quick-reply-btn:hover {
  background: #f5f0eb;
  border-color: #6b5444;
}

@media (max-width: 480px) {
  .chatbot-window {
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 80px);
    max-height: none;
    border-radius: 16px 16px 0 0;
  }
  .chatbot-toggle {
    bottom: 16px;
    right: 16px;
  }
}

