/* ============================= */
/* Ez-ISO Chatbot Modal Only CSS */
/* Scoped 100% to #modalChatbot  */
/* ============================= */

/* 1. 챗봇 내부 요소만 아웃라인 제거 (Bootstrap 보호) */
#modalChatbot .chatbot-window * {
  box-sizing: border-box !important;
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}

#modalChatbot button,
#modalChatbot select,
#modalChatbot textarea {
  border: none;
  background: none;
}

/* 2. 모달 기본 영역 보호 */
/* #modalChatbot .chatbot-modal-content {
  background: transparent !important;
  border: none !important;
} */

/* ============================*/
/* 2. 챗봇 창 */
/* ============================*/
/* 2.1. 기본 챗봇 창 설정 (PC 중심) */
#modalChatbot .chatbot-window {
  position: relative;
  width: 660px;          /* 기본 너비 */
  max-width: 95vw;       /* 화면보다 커지지 않도록 제한 (모바일 핵심) */
  min-width: 264px;
  height: 820px;         /* 기본 높이 */
  max-height: 85vh;      /* 화면 높이의 85%까지만 (모바일 핵심) */
  min-height: 328px;
  background-color: #fff;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: auto;
  box-shadow: 12px 12px 20px rgba(0, 0, 0, 0.18);
}

/* 2.2. 모바일/태블릿용 미디어 쿼리 (768px 이하) */
@media (max-width: 768px) {
  /* 부트스트랩 모달 대화창 간격 조정 */
  #modalChatbot .modal-dialog {
    margin: 10px; /* 모바일에서 화면 끝 여백 */
    display: flex;
    align-items: center; /* 세로 중앙 정렬 */
    min-height: calc(100% - 20px);
  }

  #modalChatbot .chatbot-window {
    width: 100%;
    height: 80vh; /* 키보드 올라오는 것을 대비해 적절한 높이 설정 */
    border-radius: 15px; /* 모바일에서는 살짝 덜 둥글게 */
  }

  /* 챗봇 내부 폰트나 여백이 너무 크다면 여기서 조정 가능 */
  #modalChatbot .chatbot-title {
    font-size: 1.2rem;
  }
}

/* 3. 헤더 */
#modalChatbot .chatbot-header-area {
  display: flex;
  align-items: center;
  justify-content: space-between; /* 양 끝 정렬 명시 */
  width: 100%;
  padding: 15px 20px;
  border-bottom: 1px solid #dedede;
}

#modalChatbot .chatbot-title-area {
  flex: none;
}

#modalChatbot .chatbot-title {
  font-size: 26px;
  font-weight: 600;
  margin: 0;
}

#modalChatbot .chatbot-header-right {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

#modalChatbot .chatbot-language-select {
  height: 32px;
  border: 2px solid #5a5a5a;
  color: #000;
  border-radius: 16px;
  padding: 0 8px;
  font-size: 12px;
  background: #fff;
  cursor: pointer;
  min-width: 0;   
  width: 110px;
}

#modalChatbot .chatbot-close {
  cursor: pointer;
  font-size: 26px;
  padding: 0 5px;
  line-height: 1;
  display: flex;
  align-items: center;
  color: #444;
}

/* 4. 메시지 영역 */
#modalChatbot .chatbot-messages-area {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  background: #fff;
}

#modalChatbot .chatbot-messages-screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#modalChatbot .chatbot-message-bubble {
  max-width: 80%;
  padding: 10px 15px;
  font-size: 14px;
  line-height: 1.35;
  word-break: break-word;
}

#modalChatbot .chatbot-user-message {
  background-color: #b7dd44;
  color: #000;
  align-self: flex-end;
  border-radius: 15px 15px 0 15px;
}

#modalChatbot .chatbot-bot-message {
  background-color: #dadada;
  color: #000;
  align-self: flex-start;
  border-radius: 15px 15px 15px 0;
}

#modalChatbot .chatbot-system-message {
  font-size: 13px;
  color: #444;
  margin: 0;
}

/* 5. 입력 영역 */
#modalChatbot .chatbot-input-area {
  padding: 8px 15px 12px;
  border-top: 3px solid #9bc716;
  background: #fff;
}

#modalChatbot .chatbot-input-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-height: 38px;
}

#modalChatbot .chatbot-textarea {
  flex: 1;
  font-size: 15px;
  resize: none;
  padding: 6px 0;
  line-height: 1.2;

  height: auto;
  min-height: 32px;
  max-height: 120px;   /* ← 여기까지는 전체가 커짐 */
  overflow-y: auto;    /* ← 초과하면 내부 스크롤 */
}

#modalChatbot .chatbot-icon-btn {
  background: none;
  border: none;
  padding-bottom: 4px;
  cursor: pointer;
}

#modalChatbot .chatbot-icon-btn img {
  width: 24px;
  height: 24px;
}

/* 6. FAQ Box */
#modalChatbot .chatbot-faq-box {
  position: absolute;
  bottom: 70px;
  left: 6px;
  right: 6px;

  background: #ffffff;
  border-radius: 16px;
  padding: 14px;

  max-height: 240px;
  overflow-y: auto;

  border: 2px solid #c4c4c4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);

  z-index: 100;

  animation: faqFadeIn 0.18s ease-out;
}

#modalChatbot .chatbot-faq-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: #555;
}

#modalChatbot .chatbot-faqItem {
  padding: 6px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
  -webkit-font-smoothing: antialiased;
  will-change: transform;
}

#modalChatbot .chatbot-faqItem:hover {
  background: #d0e7aa;
}