/* Khung chat culcat.vn — xem js/chat.jsx.
   Chỉ dùng biến màu có sẵn trong colors_and_type.css để widget không lệch tông
   khi đổi mood. */

.cc-chat-launcher {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 60;
  border: 1px solid var(--ink, #2B2721);
  background: var(--paper, #F6F1E7);
  color: var(--ink, #2B2721);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12);
}
.cc-chat-launcher:hover { background: var(--ink, #2B2721); color: var(--paper, #F6F1E7); }

.cc-chat {
  position: fixed;
  right: 16px;
  bottom: 80px;
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
  /* Chiều cao động chứ không cố định: bàn phím ảo trên điện thoại ăn mất nửa màn,
     và một khung chat cao hơn màn hình thì không bấm được nút Gửi. */
  max-height: min(70vh, 560px);
  display: flex;
  flex-direction: column;
  background: var(--paper, #F6F1E7);
  border: 1px solid var(--ink, #2B2721);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .18);
}

.cc-chat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(43, 39, 33, .18);
  font-weight: 600;
}
.cc-chat__head button {
  border: 0;
  background: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

.cc-chat__body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.cc-chat__intro input,
.cc-chat__foot textarea {
  width: 100%;
  border: 1px solid rgba(43, 39, 33, .3);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 14px;
  background: #fff;
  color: var(--ink, #2B2721);
}
.cc-chat__intro button,
.cc-chat__foot button {
  border: 1px solid var(--ink, #2B2721);
  background: var(--ink, #2B2721);
  color: var(--paper, #F6F1E7);
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 14px;
  cursor: pointer;
}
.cc-chat__intro button:disabled,
.cc-chat__foot button:disabled { opacity: .45; cursor: default; }

.cc-chat__msg {
  max-width: 82%;
  padding: 8px 11px;
  border-radius: 14px;
  white-space: pre-wrap;
  word-break: break-word;
}
.cc-chat__msg--me { align-self: flex-end; background: var(--ink, #2B2721); color: var(--paper, #F6F1E7); }
.cc-chat__msg--them { align-self: flex-start; background: rgba(43, 39, 33, .08); }

.cc-chat__hint { font-size: 12px; opacity: .65; }
.cc-chat__error { font-size: 12px; color: #B3261E; }

.cc-chat__foot {
  border-top: 1px solid rgba(43, 39, 33, .18);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-chat__foot button { align-self: flex-end; }
