/* --- Fyndii Chat UI Modern Enhancements --- */

/* Chat thread row container */
.chat-thread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 0.5rem;
  background: #f7f9fb;
  border-radius: 8px;

/* --- Clean Modern Chat Thread List Sidebar --- */
.chat-thread-list {
  width: 260px;
  min-width: 220px;
  max-width: 320px;
  background: #f4f6fa;
  border-radius: 16px 0 0 16px;
  padding: 24px 0 24px 0;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.04);
  border-right: 1.5px solid #e3e7ee;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  box-sizing: border-box;
}
.chat-thread-list-items {
  list-style: none;
  padding: 0;
  margin: 0;
  min-height: 40px;
  min-width: 180px;
  background: transparent;
  box-sizing: border-box;
}
.chat-thread-list-item {
  display: flex;
  align-items: stretch;
  background: none;
  border: none;
  position: relative;
  min-height: 54px;
  margin: 0 10px 10px 10px;
  border-radius: 10px;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.chat-thread-list-item .chat-thread-btn {
  width: 100%;
}
.chat-thread-list-item-active .chat-thread-btn {
  background: linear-gradient(90deg, #eaf3ff 80%, #d6eaff 100%) !important;
  border: 1.5px solid #0079f2 !important;
  box-shadow: 0 4px 16px rgba(0,123,242,0.10);
}
  background: #f4f6fa;
  border-radius: 8px;
  font-size: 1.04rem;
  color: #222;
  word-break: break-word;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* Chat form and input */
.chat-form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 1.2rem;
}
.chat-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border: 1px solid #e3e7ee;
  font-size: 1rem;
  background: #f7f9fb;
  color: #222;
}
.chat-send-btn {
  background: #00c6a2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.5rem;
  font-weight: bold;
  font-size: 1.08rem;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-send-btn:hover {
  background: #009e82;
}

/* Lead details box */
.lead-service span {
  background: #0079f2;
  color: #fff;
  padding: 0.3em 0.8em;
  border-radius: 6px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 1rem;
}
.lead-type {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.lead-desc {
  color: #6b7a90;
  font-size: 0.98rem;
  margin-bottom: 1rem;
}
.lead-contact {
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lead-qr {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.lead-postcode {
  margin-bottom: 0.7rem;
}
.lead-divider {
  margin: 1.2rem 0;
  border: none;
  border-top: 1px solid #e3e7ee;
}
/* Chat thread row improvements */
.chat-thread-row {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 0.5rem;
  gap: 0.5rem;
  box-sizing: border-box;
}
.chat-thread-info {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.chat-thread-email {
  font-weight: 600;
  font-size: 1.05rem;
  color: #222;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-thread-preview {
  color: #6b7a90;
  font-size: 0.97rem;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-unread-dot {
  margin-left: 10px;
  width: 10px;
  height: 10px;
  background: #e53935;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(229,57,53,0.12);
}
.delete-chat-btn {
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-left: 18px;
  align-self: stretch;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(229,57,53,0.10);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  letter-spacing: 0.02em;
}
.delete-chat-btn:hover {
  background: #b71c1c;
  box-shadow: 0 2px 12px rgba(229,57,53,0.18);
}

/* Chat thread list improvements */
.chat-thread-list-items {
  padding: 0 0 0 0;
  margin: 0;
}
.chat-thread-list-item {
  display: flex;
  align-items: stretch;
  background: none;
  border: none;
  position: relative;
  min-height: 56px;
}
.chat-thread-list-item:not(:last-child) {
  border-bottom: 1px solid #e3e7ee;
}
.chat-thread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.5rem 0.5rem 0.5rem 0.5rem;
}
.chat-thread-btn {
  flex: 1 1 0;
  text-align: left;
  padding: 0.5rem 1.2rem 0.5rem 0.5rem;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.chat-thread-btn:hover {
  background: #e3e7ee;
}
.chat-thread-email {
  font-weight: 600;
  font-size: 1.05rem;
  color: #222;
  max-width: 140px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
}
.chat-thread-preview {
  color: #6b7a90;
  font-size: 0.97rem;
  margin-left: 8px;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-unread-dot {
  margin-left: 10px;
  width: 10px;
  height: 10px;
  background: #e53935;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 1px 4px rgba(229,57,53,0.12);
}
.delete-chat-btn {
  background: #e53935;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.5rem 1.2rem;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  margin-left: 18px;
  align-self: stretch;
  transition: background 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 8px rgba(229,57,53,0.10);
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  letter-spacing: 0.02em;
}

/* Chat message bubble */
.chat-message {
  margin-bottom: 0.6rem;
  padding: 0.7rem 1.2rem;
  background: #f4f6fa;
  border-radius: 8px;
  font-size: 1.04rem;
  color: #222;
  word-break: break-word;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

/* Chat form and input */
.chat-form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 1.2rem;
}
.chat-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border: 1px solid #e3e7ee;
  font-size: 1rem;
  background: #f7f9fb;
  color: #222;
}
.chat-send-btn {
  background: #00c6a2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.5rem;
  font-weight: bold;
  font-size: 1.08rem;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-send-btn:hover {
  background: #009e82;
}

/* Lead details box */
.lead-service span {
  background: #0079f2;
  color: #fff;
  padding: 0.3em 0.8em;
  border-radius: 6px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 1rem;
}
.lead-type {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.lead-desc {
  color: #6b7a90;
  font-size: 0.98rem;
  margin-bottom: 1rem;
}
.lead-contact {
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lead-qr {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.lead-postcode {
  margin-bottom: 0.7rem;
}
.lead-divider {
  margin: 1.2rem 0;
  border: none;
  border-top: 1px solid #e3e7ee;
}
/* Chat thread row layout */
.chat-thread-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.chat-thread-btn {
  flex: 1;
  text-align: left;
  padding: 0.7rem 1.2rem;
  border: none;
  background: none;
  cursor: pointer;
  position: relative;
  border-radius: 8px;
  transition: background 0.15s;
}
.chat-thread-btn:hover {
  background: #e3e7ee;
}
.chat-thread-email {
  font-weight: 600;
}
.chat-thread-preview {
  color: #888;
  font-size: 0.95rem;
  margin-left: 8px;
}
.chat-unread-dot {
  position: absolute;
  top: 12px;
  right: 18px;
  width: 12px;
  height: 12px;
  background: #e53935;
  border-radius: 50%;
  display: inline-block;
}

/* Lead details box */
.lead-service span {
  background: #0079f2;
  color: #fff;
  padding: 0.3em 0.8em;
  border-radius: 6px;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 1rem;
}
.lead-type {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.lead-desc {
  color: #6b7a90;
  font-size: 0.98rem;
  margin-bottom: 1rem;
}
.lead-contact {
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 12px;
}
.lead-qr {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.lead-postcode {
  margin-bottom: 0.7rem;
}
.lead-divider {
  margin: 1.2rem 0;
  border: none;
  border-top: 1px solid #e3e7ee;
}

/* Chat message bubble */
.chat-message {
  margin-bottom: 0.6rem;
  padding: 0.6rem 1rem;
  background: #f4f6fa;
  border-radius: 8px;
  font-size: 1rem;
  color: #222;
  word-break: break-word;
}

/* Chat form and input */
.chat-form {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 1.2rem;
}
.chat-input {
  flex: 1;
  padding: 0.7rem 1rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 1rem;
}
.chat-send-btn {
  background: #00c6a2;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.5rem;
  font-weight: bold;
  font-size: 1.08rem;
  cursor: pointer;
  transition: background 0.15s;
}
.chat-send-btn:hover {
  background: #009e82;
}
/* Professional chat thread list and delete button styling */
.chat-thread-list-item {
  display: flex;
  align-items: center;
  padding: 0 0 0 0;
  margin-bottom: 0;
  background: none;
  border: none;
  position: relative;
}

.chat-thread-list-item:not(:last-child) {
  border-bottom: 1px solid #e3e7ee;
}

.chat-thread-list-item > div {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
}

.chat-thread-btn {
  transition: background 0.15s;
  border-radius: 8px;
  padding-right: 1.5rem;
}
.chat-thread-btn:hover {
  background: #e3e7ee;
}


/* Chat thread list item and delete button improvements */
.chat-thread-list-item {
  display: flex;
  align-items: center;
  padding: 0;
  margin-bottom: 6px;
  background: none;
  border: none;
  position: relative;
}

.chat-thread-list-item > div {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-thread-btn {
  transition: background 0.15s;
}
.chat-thread-btn:hover {
  background: #e3e7ee;
}


/* Fyndii Professional Chat Styles */

.chat-section {
  /* Ensures chat section matches dashboard look */
  background: #f7f9fb;
  border-radius: 16px;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.04);
  padding: 0;
}

.dashboard-chat-container {
  display: flex;
  gap: 0;
  min-height: 340px;
  background: transparent;
  border-radius: 16px;
  box-shadow: none;
  padding: 0;
}

.chat-thread-list {
  width: 260px;
  min-width: 220px;
  max-width: 320px;
  background: #f4f6fa;
  border-radius: 16px 0 0 16px;
  padding: 24px 0 24px 0;
  box-shadow: 0 2px 12px 0 rgba(0,0,0,0.04);
  border-right: 1px solid #e3e7ee;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
  border: 2px solid rgb(0, 0, 0) !important; /* DEBUG: show border */
  box-sizing: border-box;
}

.chat-thread-list-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: #222;
  margin-bottom: 1.2rem;
  padding-left: 28px;
}

.chat-thread-list-items {
  list-style: none;
  padding: 0 0 0 8px;
  margin: 0;
  min-height: 40px;
  min-width: 180px;
  border: 2px solid #00d !important; /* DEBUG: show border */
  background: #fff !important;
  box-sizing: border-box;
}

.chat-main-area {
  flex: 1 1 0;
  background: #fff;
  border-radius: 0 16px 16px 0;
  box-shadow: none;
  padding: 32px 36px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
}

.chat-active-area {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

.chat-active-title {
  margin-bottom: 1.2rem;
  color: #222;
  font-size: 1.18rem;
  font-weight: 600;
}

/* Add more styles for chat bubbles, input, send button, etc. as needed */
