.svchat { position: fixed; right: 18px; bottom: 18px; z-index: 50; font-size: 16px; }
.svchat-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--green, #1f6b4a); color: #fff; border: 0; border-radius: 999px;
  padding: 12px 18px; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 6px 18px rgba(28, 25, 21, .18);
}
.svchat-btn:hover { background: var(--green-dark, #164e36); }
.svchat-btn:focus-visible, .svchat-x:focus-visible { outline: 3px solid #f2c94c; outline-offset: 2px; }
.svchat-dot { width: 9px; height: 9px; border-radius: 50%; background: #9fe0bd; box-shadow: 0 0 0 2px rgba(255,255,255,.35); }
.svchat.has-new .svchat-dot { background: #f2c94c; }
.svchat.open .svchat-btn { display: none; }
.svchat-panel {
  width: min(360px, calc(100vw - 24px)); max-height: min(560px, calc(100vh - 36px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card, #fffdf9); color: var(--ink, #1c1915);
  border: 1px solid var(--line, #e4ddd2); border-radius: 14px;
  box-shadow: 0 12px 32px rgba(28, 25, 21, .2);
}
.svchat-panel[hidden] { display: none; }
.svchat-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--green, #1f6b4a); color: #fff; }
.svchat-x { background: transparent; border: 0; color: #fff; font-size: 24px; line-height: 1; cursor: pointer; padding: 0 4px; }
.svchat-intro { margin: 0; padding: 10px 14px; font-size: 14px; color: var(--muted, #5e584f); border-bottom: 1px solid var(--line, #e4ddd2); }
.svchat-log { flex: 1 1 auto; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.svchat-log:empty { display: none; }
.svchat-msg { max-width: 85%; padding: 8px 10px; border-radius: 12px; font-size: 15px; line-height: 1.4; }
.svchat-msg.me { align-self: flex-end; background: #e8f2ec; }
.svchat-msg.them { align-self: flex-start; background: var(--paper, #f6f1e8); border: 1px solid var(--line, #e4ddd2); }
.svchat-who { display: block; font-size: 11px; color: var(--muted, #5e584f); margin-bottom: 2px; }
.svchat-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.svchat-form { padding: 10px 14px 12px; border-top: 1px solid var(--line, #e4ddd2); display: flex; flex-direction: column; gap: 6px; }
.svchat-form textarea, .svchat-form input[type=email] {
  width: 100%; font: inherit; font-size: 15px; padding: 8px 10px;
  border: 1px solid var(--line, #e4ddd2); border-radius: 8px;
  background: #ffffff !important; color: #111111 !important;
  -webkit-text-fill-color: #111111 !important; caret-color: #111111 !important;
  color-scheme: light !important; resize: vertical;
}
.svchat-form textarea::placeholder, .svchat-form input[type=email]::placeholder {
  color: #6b655c !important; -webkit-text-fill-color: #6b655c !important; opacity: 1;
}
.svchat-email { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted, #5e584f); }
.svchat-email[hidden], .svchat-email[hidden] + .svchat-small { display: none; }
.svchat-small { margin: 0; font-size: 12px; color: var(--muted, #5e584f); }
.svchat-status { margin: 0; font-size: 13px; min-height: 0; }
.svchat-status:empty { display: none; }
.svchat-status.bad { color: var(--warn, #8a3d12); }
.svchat-send { align-self: flex-end; background: var(--green, #1f6b4a); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; font: inherit; font-weight: 700; cursor: pointer; }
.svchat-send[disabled] { opacity: .6; cursor: default; }
.svchat-hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 520px) {
  .svchat { right: 12px; bottom: 12px; }
  .svchat.open { left: 12px; }
  .svchat-panel { width: 100%; max-height: calc(100vh - 24px); }
  .svchat-btn { padding: 11px 15px; font-size: 15px; }
}
@media print { .svchat { display: none; } }
