/* Public floating chat widget — آهن تیک */
.ab-site-chat {
  position: fixed;
  z-index: 60;
  left: 1rem;
  bottom: 5.5rem;
  font-family: Vazirmatn, ui-sans-serif, system-ui, sans-serif;
}
@media (min-width: 768px) {
  .ab-site-chat { bottom: 1.5rem; left: 1.5rem; }
}

.ab-site-chat__fab {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  border: 0;
  background: #0057b8;
  color: #fff;
  box-shadow: 0 10px 30px rgba(0, 87, 184, 0.35);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s ease, background 0.15s ease;
}
.ab-site-chat__fab:hover { background: #003f87; transform: translateY(-1px); }
.ab-site-chat__fab svg { width: 26px; height: 26px; }

.ab-site-chat__panel {
  position: absolute;
  left: 0;
  bottom: 70px;
  width: min(360px, calc(100vw - 2rem));
  height: min(480px, calc(100vh - 8rem));
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ab-site-chat__panel[hidden] { display: none !important; }

.ab-site-chat__head {
  padding: 12px 14px;
  background: linear-gradient(135deg, #0057b8, #003f87);
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.ab-site-chat__head strong { display: block; font-size: 14px; }
.ab-site-chat__head span { display: block; margin-top: 2px; font-size: 11px; opacity: 0.85; }
.ab-site-chat__head button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
}

.ab-site-chat__body {
  flex: 1;
  overflow: auto;
  padding: 12px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ab-site-chat__hint {
  font-size: 12px;
  color: #64748b;
  line-height: 1.7;
  text-align: center;
  padding: 16px 8px;
}

.ab-site-chat__bubble {
  max-width: 85%;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.7;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  align-self: flex-start;
}
.ab-site-chat__bubble.is-mine {
  align-self: flex-end;
  background: #dbeafe;
  border-color: #bfdbfe;
}
.ab-site-chat__bubble time {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  color: #94a3b8;
}

.ab-site-chat__foot {
  border-top: 1px solid #e2e8f0;
  padding: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ab-site-chat__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.ab-site-chat__meta input,
.ab-site-chat__compose input {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: 13px;
  font-family: inherit;
}
.ab-site-chat__compose {
  display: flex;
  gap: 6px;
}
.ab-site-chat__compose button {
  border: 0;
  border-radius: 10px;
  background: #0057b8;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 0 14px;
  cursor: pointer;
  white-space: nowrap;
}
.ab-site-chat__compose button:disabled { opacity: 0.6; cursor: wait; }
.ab-site-chat__status {
  font-size: 11px;
  color: #64748b;
  min-height: 16px;
}
.ab-site-chat__status.is-error { color: #be123c; }
.ab-site-chat__status.is-ok { color: #047857; }
