﻿.chat-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: #20231f;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
  box-shadow: 0 16px 38px rgba(32, 35, 31, 0.22);
}

.chat-window {
  position: fixed;
  right: 18px;
  bottom: 78px;
  z-index: 61;
  display: none;
  width: min(380px, calc(100vw - 36px));
  overflow: hidden;
  border: 1px solid #deded6;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 18px 55px rgba(32, 35, 31, 0.18);
}

.chat-window.open {
  display: grid;
}

.chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: #20231f;
  color: #fff;
}

.chat-head strong {
  display: block;
}

.chat-head span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.chat-close {
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 22px;
}

.chat-messages {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  max-height: 360px;
  overflow: auto;
  padding: 14px;
  background: #f8f7f1;
}

.chat-bubble {
  max-width: 82%;
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
  color: #20231f;
  line-height: 1.55;
  box-shadow: 0 4px 16px rgba(32, 35, 31, 0.06);
}

.chat-bubble.customer {
  justify-self: end;
  background: #20231f;
  color: #fff;
}

.chat-bubble small {
  display: block;
  margin-top: 5px;
  opacity: 0.64;
  font-size: 11px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #deded6;
}

.chat-form input {
  min-height: 42px;
  border: 1px solid #deded6;
  border-radius: 6px;
  padding: 9px 11px;
}

.chat-form button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  background: #20231f;
  color: #fff;
  cursor: pointer;
  font-weight: 900;
}

.chat-admin-list {
  display: grid;
  gap: 12px;
}

.chat-thread {
  border: 1px solid var(--line, #deded6);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.chat-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  background: var(--soft, #eef0ec);
}

.chat-thread-body {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.chat-reply {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line, #deded6);
}

.chat-reply input {
  min-height: 40px;
  border: 1px solid var(--line, #deded6);
  border-radius: 5px;
  padding: 8px 10px;
}

