/* Chat widget styled to site brand */
.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 380px;
  max-width: calc(100% - 48px);
  max-height: 640px;
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(2,16,39,0.12);
  font-family: Lato, Roboto, Arial, sans-serif;
  z-index: 2000;
}

.chat-widget__button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #0F4C81;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(15,76,129,0.2);
  cursor: pointer;
  border: none;
}

.chat-panel {
  background: #fff;
  border: 1px solid rgba(9,30,63,0.06);
  width: 380px;
  height: 560px;
  display: flex;
  flex-direction: column;
}
.chat-panel--hidden { display: none; }

.chat-header {
  background: linear-gradient(90deg,#0F4C81 0%, #072668 100%);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-header .title { font-weight: 700; font-size: 15px; }
.chat-header .close { background: transparent; border: none; color: rgba(255,255,255,0.9); font-size: 18px; cursor: pointer; }

.chat-body { padding: 14px; flex: 1; overflow-y: auto; background: #fbfdff; }
.chat-body .message { margin-bottom: 12px; display: flex; }
.chat-body .message .bubble { max-width: 78%; padding: 10px 12px; border-radius: 12px; line-height: 1.3; }
.chat-body .message.assistant .bubble { background: #f1f6fb; color: #072668; border: 1px solid rgba(7,38,104,0.04); }
.chat-body .message.user { justify-content: flex-end; }
.chat-body .message.user .bubble { background: #0F4C81; color: #fff; }

.chat-input { padding: 12px; border-top: 1px solid #eef3f7; display: flex; gap: 8px; align-items: center; }
.chat-input textarea { flex: 1; min-height: 48px; max-height: 120px; resize: vertical; padding: 10px; border-radius: 8px; border: 1px solid #e6eef6; }
.chat-input button.send { background: #F08521; color: #fff; border: none; padding: 10px 14px; border-radius: 8px; cursor: pointer; }

.chat-footer { font-size: 12px; color: #6b7280; padding: 8px 12px; text-align: center; }

.chat-loading { text-align: center; color: #6b7280; font-size: 13px; }

.chat-small { width: 320px; }

/* Responsive adjustments */
@media (max-width: 480px) {
  /*.chat-panel { width: calc(100% - 36px); right: 18px; }*/
  .chat-widget__button { right: 18px; bottom: 18px; }
}
