/* =========================================================
   나무자전거 챗봇 – 오른쪽 레이어 일체화 보정 테마
========================================================= */

:root {
  --main-green: #68b880;
  --user-bg: #e8f5ee;
  --bot-bg: #f1f3f5;
  /* 테두리 색상을 오른쪽 박스들과 일치하도록 보정 */
  --border-line: #dddddd; 
}

/* 1. 전체 컨테이너 테두리 수정 */
.namu-chatbot {
  position: relative !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 700px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  /* 오른쪽 레이어 박스의 선명도에 맞춤 */
  border: 1px solid var(--border-line); 
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  box-sizing: border-box;
  /* 오른쪽 박스들의 미세한 곡률 반영 */
  border-radius: 3px; 
}

/* 2. 헤더 하단 선 수정 */
.namu-chatbot .chat-header {
  background: #fff;
  color: var(--main-green);
  padding: 12px 18px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  /* 초록색 선 대신 오른쪽 레이어와 같은 회색 선 적용 */
  border-bottom: 1px solid var(--border-line); 
}

.namu-chatbot .chat-header h3 {
  font-size: 1.05rem;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* 퀵 버튼 하단 구분선 보정 */
.quick-recommend {
  display: flex;
  gap: 8px;
  padding: 10px 15px;
  background: #fff;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-bottom: 1px solid #f0f0f0;
}

.q-btn {
  background: #fff;
  border: 1px solid var(--border-line);
  color: #555;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* 채팅 로그 */
.namu-chatbot .chat-log {
  flex: 1;
  padding: 15px 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.namu-chatbot .chat-log > div {
  max-width: 80%;
  font-size: 15px;
  padding: 10px 15px;
  border-radius: 18px;
  line-height: 1.6;
}

.namu-chatbot .chat-log .bot { margin-right: auto; background: var(--bot-bg); color: #333; }
.namu-chatbot .chat-log .user { margin-left: auto; background: var(--user-bg); color: #134e2f; }

/* 푸터 및 입력창 상단 선 보정 */
.chat-footer-wrap {
  border-top: 1px solid var(--border-line);
  background: #fff;
}

.chat-notice {
  font-size: 11px;
  color: #bbb;
  text-align: center;
  padding: 6px;
}

.chat-input-wrap {
  display: flex;
  padding: 0 15px 15px 15px;
  gap: 10px;
  align-items: stretch;
}

.namu-chatbot #chat-input {
  flex: 1;
  border: 1px solid var(--border-line);
  padding: 10px 18px;
  border-radius: 25px;
  font-size: 16px;
  outline: none;
  background: #f9f9f9;
  height: 45px;
}

/* 전송 버튼 */
.send-btn {
  background: var(--main-green);
  color: #fff;
  border: none;
  padding: 0 20px;
  border-radius: 25px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  flex-shrink: 0;
  height: 45px;
  min-width: 70px;
  font-size: 15px;
}

/* 모바일 전용 */
@media (max-width: 768px) {
  .namu-chatbot { height: 75vh; border-radius: 0; border-left: none; border-right: none; }
  .namu-chatbot .chat-header { padding: 10px 15px; }
}

/* 스마트스토어 버튼 */
.namu-chatbot .chat-link {
  display: inline-block;
  margin: 8px 0;
  padding: 8px 18px;
  background-color: #68b880 !important; 
  color: #ffffff !important;           
  border-radius: 6px;
  text-decoration: none !important;
  font-size: 13.5px;
  font-weight: bold;
  text-align: center;
  box-shadow: 0 3px 8px rgba(3, 199, 90, 0.2);
  transition: all 0.2s ease;
  border: none;
  line-height: 1.2;
}

.namu-chatbot .chat-link:hover {
  background-color: #02b350 !important;
  transform: translateY(-1.5px);
  box-shadow: 0 5px 12px rgba(3, 199, 90, 0.3);
}