/* Scoped from KMITL Chatbot v.1 (Chatbot v.1.zip) — widget shell only */
.kllc-chat-shell {
  --glass-bg: rgba(255, 255, 255, 0.15);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --glass-highlight: inset 0 1px 1px rgba(255, 255, 255, 0.8), inset 0 -1px 1px rgba(255, 255, 255, 0.2);
  --apple-blue: rgba(0, 122, 255, 0.85);
  --text-main: #1d1d1f;
  width: 100%;
  height: 100%;
  background: var(--glass-bg);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  border: 1px solid var(--glass-border);
  border-radius: 30px;
  box-shadow: var(--glass-shadow), var(--glass-highlight);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'IBM Plex Sans Thai', 'IBM Plex Sans', sans-serif;
}

.kllc-chat-shell .chat-header {
  padding: 20px 24px;
  background: rgba(255, 255, 255, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  gap: 15px;
}

.kllc-chat-shell .chat-header img {
  width: 45px;
  height: 45px;
  border-radius: 14px;
  object-fit: contain;
}

.kllc-chat-shell .header-info h2 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.kllc-chat-shell .header-info p {
  font-size: 12px;
  color: #0056b3;
  font-weight: 500;
  margin-top: 2px;
}

.kllc-chat-shell .chat-box {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scrollbar-width: none;
}
.kllc-chat-shell .chat-box::-webkit-scrollbar { display: none; }

.kllc-chat-shell .message {
  max-width: 85%;
  padding: 14px 18px;
  border-radius: 20px;
  font-size: 14.5px;
  line-height: 1.5;
  word-wrap: break-word;
}

.kllc-chat-shell .user-message {
  background: var(--apple-blue);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.kllc-chat-shell .bot-message {
  background: rgba(255, 255, 255, 0.6);
  color: var(--text-main);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.kllc-chat-shell .typing-indicator {
  display: none;
  gap: 6px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.kllc-chat-shell .dot {
  width: 8px;
  height: 8px;
  background-color: #86868b;
  border-radius: 50%;
  animation: kllc-chat-bounce 1.4s infinite ease-in-out both;
}
.kllc-chat-shell .dot:nth-child(1) { animation-delay: -0.32s; }
.kllc-chat-shell .dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes kllc-chat-bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.kllc-chat-shell .chat-input-container {
  padding: 16px 20px 24px;
}

.kllc-chat-shell .quick-replies {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
  scrollbar-width: none;
}
.kllc-chat-shell .quick-replies::-webkit-scrollbar { display: none; }

.kllc-chat-shell .quick-reply-btn {
  background: rgba(255, 255, 255, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.5);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13.5px;
  color: var(--text-main);
  white-space: nowrap;
  cursor: pointer;
}

.kllc-chat-shell .input-wrapper {
  display: flex;
  gap: 10px;
  background: rgba(255, 255, 255, 0.75);
  padding: 8px 8px 8px 18px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.kllc-chat-shell #user-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  outline: none;
  color: var(--text-main);
}

.kllc-chat-shell #send-btn {
  background: linear-gradient(135deg, #007aff, #0056b3);
  color: white;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}
