/* === Wrapper === */
.chat-widget {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
  font-family: Arial, sans-serif;
}

/* === Header === */
.chat-header {
  padding: 10px;
  background: #336699; /* default brand */
  color: #fff;
  font-weight: bold;
  display: flex;
  align-items: center;
}
.chat-avatars {
  display: flex;
  gap: 8px;
}
.chat-avatars img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s, border-color 0.2s;
}
.chat-avatars img.active {
  border-color: #fff;
  transform: scale(1.1);
}

/* === Body (messages) === */
.chat-body {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* bubbles */
.msg {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}
.msg.user {
  align-self: flex-end;
  background: #e1f5fe;
  border-bottom-right-radius: 4px;
}
.msg.bot {
  align-self: flex-start;
  background: #eee;
  border-bottom-left-radius: 4px;
  display: flex;
  align-items: flex-start;
}
.msg.bot img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  margin-right: 6px;
}
.msg.bot span {
  display: inline-block;
  max-width: calc(100% - 40px);
}

/* === Footer (input) === */
.chat-footer {
  display: flex;
  border-top: 1px solid #ddd;
  padding: 8px;
  background: #fff;
}
.chat-footer textarea {
  flex: 1;
  resize: none;
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 8px;
  font-size: 14px;
  outline: none;
  min-height: 40px;
  max-height: 100px;
}
.chat-footer button {
  margin-left: 8px;
  background: #336699; /* default brand */
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.chat-footer button:hover {
  background: #24547a;
}

/* Default widget (hörnet) */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 380px;
  height: 520px;
}

/* Full chat (på /chat/) */
.mode-full .chat-widget {
  position: relative;
  margin: auto;
  width: 640px;
  height: 700px;
}



/* === Brand overrides === */
/* Xavier Media */
.brand-xmedia .chat-header,
.brand-xmedia .chat-footer button { background: #336699; }

/* WebWorld */
.brand-webworld .chat-header,
.brand-webworld .chat-footer button { background: #0099cc; }

/* Roswell UFOs */
.brand-roswellufos .chat-header,
.brand-roswellufos .chat-footer button { background: #993366; }

/* Xavier Astrology */
.brand-astrology .chat-header,
.brand-astrology .chat-footer button { background: #663399; }
