#chat-panel {
  height: 70vh;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  background-color: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#chat-messages {
  flex: 1;
  overflow-y: auto;
}

.thread-summary-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  margin-bottom: 10px;
  background-color: #f5f5f5;
  border-radius: 10px;
}

.thread-summary-info {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  color: #333;
}

.thread-summary-info .summary-cancelled {
  padding: 0 6px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #fff;
  background-color: #d9534f;
}

.thread-summary-info .summary-code {
  font-weight: 600;
}

.thread-summary-info .summary-unit {
  font-weight: 500;
}

.thread-summary-info > span:not(:first-child)::before {
  content: "\00B7";
  margin-right: 6px;
  color: #999;
}

.thread-summary-bar .thread-summary-details-btn {
  flex-shrink: 0;
}

.chat-date-separator {
  display: flex;
  align-items: center;
  margin: 12px 0;
  color: #999;
  font-size: 11px;
}

.chat-date-separator::before,
.chat-date-separator::after {
  content: '';
  flex: 1;
  border-top: 1px solid #e0e0e0;
}

.chat-date-separator span {
  padding: 0 10px;
}

.message-row {
  display: flex;
  justify-content: center;
  margin: 3px 0;
}

.message-row.host {
  justify-content: flex-end;
}

.message-row.guest {
  justify-content: flex-start;
}

.chat-bubble {
  display: inline-block;
  max-width: 60%;
  min-width: 80px;
  padding: 7px 12px;
  border-radius: 14px;
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: normal;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  font-size: 14px;
  margin-bottom: 4px;
}

.chat-bubble .media-heading {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 2px;
}

.chat-bubble .message {
  margin: 0;
}

.chat-bubble p.h5 {
  font-size: 14px;
  line-height: 1.35;
  margin: 0;
}

.chat-bubble small.text-light {
  font-size: 11px;
}

.chat-bubble.host {
  background-color: #d9edf7;
  text-align: right;
}

.chat-bubble.guest {
  background-color: #f5f5f5;
  text-align: left;
}

.chat-bubble hr {
  margin-top: 3px;
  margin-bottom: 3px;
}

.reactions-list li {
  margin-start: 5px;
  margin-end: 5px;
}

.chat-bubble .thumbs-up-reaction {
  padding: 0 6px;
  font-size: 12px;
  line-height: 1.4;
}

.chat-mobile-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px;
  margin-bottom: 6px;
}

.chat-mobile-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#chat-box {
  border-top: 1px solid #dee2e6;
  padding: 10px 0;
  flex-shrink: 0;
}

.chat-compose {
  width: 100%;
  border: 1px solid #ccd1d9;
  border-radius: 16px;
  background-color: #fff;
  padding: 8px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.chat-compose:focus-within {
  border-color: #80bdff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.15);
}

.chat-compose-input {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: none;
  padding: 2px 0;
}

.chat-compose-input:focus {
  outline: none;
  box-shadow: none;
}

.chat-compose-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.chat-send-btn {
  border-radius: 50px;
  padding: 6px 18px;
}

.chat-send-btn .glyphicon {
  margin-right: 4px;
}

.chat-mark-unread {
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
}

.chat-mark-unread-link {
  background: none;
  border: none;
  color: #2196F3;
  font-size: 13px;
  padding: 2px 6px;
  cursor: pointer;
}

.chat-mark-unread-link:hover,
.chat-mark-unread-link:focus {
  text-decoration: underline;
  background: none;
}

@media (max-width: 991px) {
  #chat-panel {
    padding: 8px;
  }

  .chat-bubble {
    max-width: 85%;
    padding: 6px 10px;
  }

  .message-row {
    margin: 2px 0;
  }
}
