.chat-thread {
  background: var(--e-global-color-background);
  margin-bottom: 30px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;  
  padding: 16px;
  -webkit-box-shadow: inset -2px -2px 66px -27px rgba(130, 146, 250, 0.44);
  -moz-box-shadow: inset -2px -2px 66px -27px rgba(130,146,250,0.44);
  box-shadow: inset -2px -2px 66px -27px rgba(130, 146, 250, 0.44);
  border-top: 1px solid #ddd;
}

.chat-thread.accordion {
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
  border-top-right-radius: 0;
  border-top-left-radius: 0;
  margin-bottom: 0;
}

.chat-thread.not-logged-in {
  padding: none;
  border: none;
}

.chat-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Core chat message styling — no background */
.chat-message {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  word-break: break-word;
  color: var(--e-global-color-text);
  display: inline-block;
  background: none;
}

/* Right-aligned self messages */
.chat-message.self {
  margin-left: auto;
}

/* Author label inside message */
.chat-message strong {
  margin-bottom: 5px;
  color: inherit;
  opacity: 0.8;
}

/* Reply form */
.chat-reply-form {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: end;
}

.chat-reply-form textarea {
  width: 100%;
  padding: 10px;
  resize: none;
  border-radius: 8px;
  border: 1px solid var(--e-global-color-primary);
  background: #fff;
}

.chat-reply-form button {
  padding: 10px 15px;
  background: var(--e-global-color-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s;
  width: fit-content;
}

.chat-reply-form button:hover {
  background: var(--e-global-color-accent);
}

.chat-message.has-bid {
  border-left: 4px solid var(--e-global-color-accent);
  background-color: rgba(0, 0, 0, 0.03); /* light background */
}

.chat-message.bid-accept {
  border-left-color: #28a745; /* green */
  background-color: #e6f5ea;
}

.chat-message.bid-decline {
  border-left-color: #dc3545; /* red */
  background-color: #faeaea;
}

.bid-line {
  margin: 6px 0 0;
  font-weight: 500;
}
/* Accordion Styles */
.chat-accordion {
  margin-bottom: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
  background: #f9f9f9;
}

.chat-accordion summary {
  padding: 12px 16px;
  cursor: pointer;
  background: #eee;
  font-weight: 600;
  position: relative;
  list-style: none; /* Removes marker in Chrome */
  outline: none;
}

.chat-accordion summary::marker {
  display: none; /* Remove default triangle in Firefox */
}

.chat-accordion summary::after {
  content: '›';
  font-size: 18px;
  position: absolute;
  right: 16px;
  top: 12px;
  transform: rotate(0deg);
  transition: transform 0.2s ease-in-out;
}

.chat-accordion[open] summary::after {
  transform: rotate(90deg);
}

.chat-accordion[open] {
  background: white;
}

.chat-accordion.has-pending-bid summary {
  background-color: #fff5e6;
  border-left: 4px solid #f0ad4e;
  position: relative;
}

.chat-accordion.has-pending-bid summary::after {
  content: "⏳";
  position: absolute;
  right: 16px;
  top: 12px;
  font-size: 16px;
  color: #f0ad4e;
}