/* ============================
   경주 여행 도우미 챗봇 스타일 (사이트 전체 톤과 통일)
   ============================ */

:root {
  --chatbot-accent: #ff9800;
  --chatbot-bg: #fffdf5;
  --chatbot-text: #5D4037;
  --chatbot-muted: #8D6E63;
  --chatbot-border: rgba(0, 0, 0, 0.1);
  --chatbot-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

/* 플로팅 버튼 */
#egg-chatbot-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 64px;
  height: 64px;
  background: var(--chatbot-accent);
  color: white;
  font-size: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--chatbot-shadow);
  z-index: 2000;
  transition: transform 0.2s ease, background 0.2s ease;
}

#egg-chatbot-button:hover {
  transform: translateY(-4px);
  background: #ffa726;
}


/* 백드롭 */
#egg-chatbot-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1999;
}


/* === 챗봇 모달 === */
#egg-chatbot-modal {
  width: min(420px, 90vw);
  height: min(580px, 85vh);
  background: var(--chatbot-bg);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
  from { opacity:0; transform:scale(0.95); }
  to { opacity:1; transform:scale(1); }
}


/* === 헤더 === */
#egg-chatbot-header {
  background: var(--chatbot-accent);
  color: white;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

#egg-chatbot-title {
  font-size: 20px;
}

#egg-chatbot-subtitle {
  font-size: 14px;
  opacity: 0.9;
}

#egg-chatbot-close {
  font-size: 28px;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}


/* === 메시지 영역 === */
#egg-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: rgba(255,255,255,0.55);
}

#egg-chatbot-messages-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


/* 공통 메시지 스타일 */
.egg-chatbot-msg {
  padding: 12px 15px;
  border-radius: 14px;
  max-width: 78%;
  font-size: 15px;
  line-height: 1.45;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* 사용자 메시지 */
.egg-chatbot-user {
  background: #ffe0b2;
  color: var(--chatbot-text);
  align-self: flex-end;
}

/* 챗봇 메시지 */
.egg-chatbot-bot, 
.egg-chatbot-system {
  background: #ffffff;
  color: var(--chatbot-text);
  align-self: flex-start;
}


/* === 입력 영역 === */
#egg-chatbot-input-area {
  border-top: 1px solid var(--chatbot-border);
  padding: 10px;
  background: #fff8e1;
  display: flex;
  gap: 8px;
}

#egg-chatbot-input {
  flex: 1;
  font-size: 15px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--chatbot-border);
  background: white;
  color: var(--chatbot-text);
}

#egg-chatbot-input:focus {
  outline: 2px solid #ffe0b2;
}

#egg-chatbot-send {
  background: var(--chatbot-accent);
  color: white;
  border: none;
  border-radius: 10px;
  padding: 0 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  box-shadow: var(--chatbot-shadow);
  transition: background 0.2s ease;
}

#egg-chatbot-send:hover {
  background: #ffa726;
}

/* 모바일 대응 */
@media (max-width: 480px) {
  #egg-chatbot-modal {
    width: 92vw;
    height: 90vh;
  }
}
