/* 부동산·중고장터·구인구직 1:1 채팅 (지도 카드 인라인 + 글 화면) */
#estate-chat,
#market-chat,
#job-chat {
  scroll-margin-top: 90px;
}

.board-chat-slot {
  margin-top: 0.75rem;
}

.board-chat-slot .board-chat-login {
  display: flex;
  justify-content: center;
  width: 100%;
}

.cebu-map-list-item.is-board-chat-open {
  cursor: default;
}

.cebu-map-list-item.is-board-chat-open .cebu-map-card {
  border-color: #bfdbfe;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.08);
}

.cebu-map-chat--inline {
  display: flex;
  flex-direction: column;
  height: 420px;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #d7e3f4;
  border-radius: 16px;
  background: #f4f7fb;
}

.cebu-map-chat .estate-chat,
.estate-chat--panel {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.estate-chat--panel .exchange-chat__head,
.estate-chat--page .exchange-chat__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.8rem 0.85rem;
  background: #122033;
  color: #fff;
}

.estate-chat-panel__back {
  flex: 0 0 auto;
  border: 0;
  border-radius: 999px;
  padding: 0.4rem 0.7rem;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.estate-chat-panel__back:hover {
  background: rgba(255, 255, 255, 0.2);
}

.estate-chat-panel__thumb {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  background: #1e3a5f;
  flex: 0 0 36px;
}

.estate-chat-panel__thumb--empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.estate-chat-panel__thumb--empty::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
  opacity: 0.72;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M4 10.5 12 4l8 6.5V20a1 1 0 0 1-1 1h-5v-6H10v6H5a1 1 0 0 1-1-1v-9.5z'/></svg>") center / contain no-repeat;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='black' d='M4 10.5 12 4l8 6.5V20a1 1 0 0 1-1 1h-5v-6H10v6H5a1 1 0 0 1-1-1v-9.5z'/></svg>") center / contain no-repeat;
}

.estate-chat-panel__titles {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.estate-chat--panel .exchange-chat__title,
.estate-chat--page .exchange-chat__title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.estate-chat-panel__listing {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.73rem;
  font-style: normal;
  color: rgba(255, 255, 255, 0.72);
}

.estate-chat-panel__detail {
  flex: 0 0 auto;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.estate-chat-panel__detail:hover {
  background: rgba(255, 255, 255, 0.22);
}

.estate-chat--panel .exchange-chat__room,
.estate-chat--page .exchange-chat__room {
  flex: 1;
  min-height: 0;
}

.estate-chat--panel .exchange-chat__messages {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 0.75rem 0.85rem 0.9rem;
  overflow-y: auto;
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.05), transparent 28%),
    #eef3f8;
}

.estate-chat--page .exchange-chat__messages {
  flex: 1;
  height: auto;
  min-height: 280px;
  padding: 1rem 0.9rem 1.1rem;
  background:
    radial-gradient(circle at 12% 8%, rgba(37, 99, 235, 0.05), transparent 28%),
    #eef3f8;
}

.estate-chat--panel .exchange-chat__threads {
  max-height: 140px;
}

.estate-chat__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 96px;
  padding: 1rem 1.1rem;
  color: #64748b;
  text-align: center;
}

.estate-chat__empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 0.35rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.estate-chat__empty strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.estate-chat__empty span {
  max-width: 16rem;
  font-size: 0.8rem;
  line-height: 1.5;
}

.estate-chat--panel .exchange-chat__msg.is-mine .exchange-chat__bubble,
.estate-chat--page .exchange-chat__msg.is-mine .exchange-chat__bubble {
  background: #2563eb;
  border-color: #2563eb;
}

.estate-chat-panel__form,
.estate-chat--page .estate-chat-panel__form {
  align-items: flex-end;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.estate-chat-panel__form textarea,
.estate-chat--page .estate-chat-panel__form textarea {
  min-height: 44px;
  max-height: 120px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  background: #f8fafc;
}

.estate-chat--panel .estate-chat-panel__send,
.estate-chat--page .estate-chat-panel__send {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 999px;
  background: #2563eb;
}

.estate-chat--page .estate-chat-panel__send {
  width: auto;
  min-width: 72px;
  padding: 0 0.95rem;
  font-size: 0.88rem;
}

.estate-chat--page {
  overflow: hidden;
  border: 1px solid #d7e3f4;
  border-radius: 18px;
  background: #f4f7fb;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.estate-chat--page .exchange-chat__messages {
  min-height: 320px;
}

@media (max-width: 1024px) {
  .cebu-map-chat--inline {
    height: 390px;
  }
}
