/* Community chat — WhatsApp-style tenant messaging */

.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
  max-height: 720px;
  background: #e5ddd5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: #075e54;
  color: #fff;
}

.chat-header h2 {
  font-size: 1.1rem;
  margin: 0;
}

.chat-header .muted {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.8rem;
  margin: 0.15rem 0 0;
}

.chat-online-badge {
  font-size: 0.75rem;
  color: #a7f3d0;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background:
    linear-gradient(rgba(229, 221, 213, 0.92), rgba(229, 221, 213, 0.92)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8bfb7' fill-opacity='0.25'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.chat-empty {
  text-align: center;
  margin: auto;
  color: #64748b;
}

.chat-bubble-row {
  display: flex;
  justify-content: flex-start;
}

.chat-bubble-row--mine {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: min(75%, 420px);
  padding: 0.5rem 0.75rem 0.35rem;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.chat-bubble--mine {
  background: #dcf8c6;
  border-bottom-right-radius: 4px;
}

.chat-bubble--theirs {
  border-bottom-left-radius: 4px;
}

.chat-bubble__author {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: #075e54;
  margin-bottom: 0.15rem;
}

.chat-bubble__text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

.chat-bubble__time {
  display: block;
  text-align: right;
  font-size: 0.65rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.chat-composer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #f0f2f5;
  border-top: 1px solid #ddd;
}

.chat-composer input {
  flex: 1;
  border: none;
  border-radius: 24px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  background: #fff;
}

.chat-composer input:focus {
  outline: 2px solid #075e54;
}

.chat-send-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  padding: 0;
  font-size: 1.1rem;
  background: #075e54;
}

.chat-send-btn:hover {
  background: #128c7e;
}
