/* The tray is the container at the bottom that holds all open chat windows */
.chat-tray {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  height: 0;
  pointer-events: none;
  z-index: 1000;
}

/* Each chat-box is a single conversation window */
.chat-box {
  position: absolute;
  bottom: 0;
  width: 300px;
  background: rgb(255, 255, 255);
  border: 1px solid rgb(204, 204, 204);
  border-bottom: none;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  pointer-events: auto;
  transition: right 0.2s ease;
}

.chat-header {
  padding: 10px;
  background: rgb(0, 132, 255);
  color: white;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.chat-title {
  color: white;
  flex: 1;
}

.chat-header-btn {
  background: none;
  color: white;
  cursor: pointer;
  line-height: 1;
}

.chat-close {
  border: none;
  font-size: 24px;
  padding: 0;
  width: 24px;
  height: 24px;
}

.chat-close:hover {
  background: rgba(0, 0, 0, 0.1);
  border-radius: 3px;
}

.chat-security-info {
  border: 1px solid rgba(255, 255, 255, 0.5);
  font-size: 14px;
  font-weight: bold;
  padding: 2px 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: 4px;
  transition: all 0.2s ease;
}

.chat-security-info:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.chat-messages {
  padding: 10px;
  background: rgb(255, 255, 255);
}

.chat-input {
  padding: 10px;
  border-top: 1px solid rgb(204, 204, 204);
}

.chat-input textarea {
  width: 100%;
  padding: 8px;
  /* border: 1px solid rgb(204, 204, 204);
  border-radius: 20px; */
  border: 0;
  outline: none;
}

.chat-resume-list {
  position: fixed;
  right: 8px;
  bottom: 340px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-height: 50vh;
  overflow-y: auto;
  max-width: 420px;
  z-index: 10000;
  pointer-events: auto;
}

.chat-resume-pill {
  border: 1px solid #d0d7de;
  background: #ffffff;
  color: #1f2328;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.chat-resume-pill:hover {
  background: #f6f8fa;
}

.message {
  margin: 5px 0;
  padding: 8px 12px;
  border-radius: 18px;
  max-width: 70%;
  word-wrap: break-word;
}

.message.outgoing {
  background: rgb(0, 132, 255);
  color: white;
  margin-left: auto;
  opacity: 0.75;
  text-align: right;
}

.message.incoming {
  background: rgb(240, 240, 240);
  color: black;
}

.message-text {
  max-width: 80%;
  overflow-wrap: anywhere;
}

.message-media {
  max-width: 100%;
  overflow-wrap: anywhere;
}
