#vizon-chat-widget {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 70;
  color: #18211d;
  font-family: Arial, sans-serif;
}

.vizon-chat-toggle {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 50%;
  background: #102237;
  box-shadow: 0 10px 28px rgba(8, 18, 28, .24);
  padding: 0;
  color: #fff;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.vizon-chat-toggle:hover { background: #183550; box-shadow: 0 14px 32px rgba(8, 18, 28, .3); transform: translateY(-2px); }
.vizon-chat-toggle:focus-visible { outline: 3px solid rgba(229, 200, 132, .55); outline-offset: 3px; }
.vizon-chat-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.vizon-chat-toggle-icon { display: grid; width: 23px; height: 23px; place-items: center; }
.vizon-chat-toggle-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
#vizon-chat-widget.is-nudged .vizon-chat-toggle { animation: vizon-chat-nudge 1.15s ease-in-out 3; }
#vizon-chat-widget.is-nudged .vizon-chat-toggle::after { position: absolute; top: -3px; right: -3px; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #e5c884; content: ''; }
@keyframes vizon-chat-nudge { 0%, 100% { transform: translateX(0); } 35% { transform: translateX(-4px); } 70% { transform: translateX(4px); } }

.vizon-chat-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 50%;
  background: #d8b77b;
  color: #102237;
  font-size: 12px;
  font-weight: 800;
}

.vizon-chat-panel {
  position: absolute;
  right: 0;
  bottom: 60px;
  display: none;
  width: min(348px, calc(100vw - 28px));
  overflow: hidden;
  border: 1px solid rgba(16, 34, 55, .15);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(8, 18, 28, .28);
}

.vizon-chat-panel.is-open { display: block; animation: vizon-chat-panel-in .18s ease-out; }
@keyframes vizon-chat-panel-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }

.vizon-chat-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #102237;
  padding: 15px 16px;
  color: #fff;
}

.vizon-chat-head-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.vizon-chat-head-title .vizon-chat-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 0;
  background: #e5c884;
  box-shadow: 0 0 0 4px rgba(229, 200, 132, .12);
  font-size: 13px;
}

.vizon-chat-kicker {
  margin: 0 0 3px;
  color: #aebfcd;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  line-height: 1.2;
}

.vizon-chat-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vizon-chat-head h2 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.2;
}

.vizon-chat-presence {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(107, 203, 149, .28);
  border-radius: 999px;
  background: rgba(66, 153, 104, .13);
  padding: 3px 7px;
  color: #aee2c2;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.vizon-chat-presence::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64d28f;
  box-shadow: 0 0 0 2px rgba(100, 210, 143, .12);
  content: '';
}

.vizon-chat-close {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);
  color: #dce5eb;
  font-size: 22px;
  line-height: 1;
}

.vizon-chat-close:hover { background: rgba(255, 255, 255, .17); color: #fff; }

.vizon-chat-messages {
  display: flex;
  max-height: 250px;
  min-height: 142px;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  background: #f7f8f8;
  padding: 13px;
}

.vizon-chat-entry {
  display: flex;
  max-width: 88%;
  flex-direction: column;
}

.vizon-chat-entry.bot { align-self: flex-start; }
.vizon-chat-entry.user { align-self: flex-end; align-items: flex-end; }

.vizon-chat-bubble {
  border-radius: 15px;
  padding: 10px 12px;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.55;
}

.vizon-chat-bubble.bot {
  border-bottom-left-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 5px rgba(15, 27, 31, .09);
}

.vizon-chat-bubble.user {
  border-bottom-right-radius: 4px;
  background: #102237;
  color: #fff;
}

.vizon-chat-receipt {
  margin: 5px 3px 0 0;
  color: #8ca1bb;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.vizon-chat-receipt::before {
  margin-right: 4px;
  color: #8ca1bb;
  content: 'You ·';
}

.vizon-chat-receipt.is-read { color: #23b977; }
.vizon-chat-receipt.is-read::before { color: #23b977; content: '● Mia ·'; }
.vizon-chat-receipt.is-failed { color: #b45c55; }

.vizon-chat-composer {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  border-top: 1px solid #e5e9e6;
  background: #fff;
  padding: 10px;
}

.vizon-chat-offline {
  display: none;
  background: #f7f8f8;
  padding: 18px;
}

.vizon-chat-panel.is-offline .vizon-chat-messages,
.vizon-chat-panel.is-offline .vizon-chat-composer { display: none; }

.vizon-chat-panel.is-offline .vizon-chat-expand { display: none; }
.vizon-chat-panel.is-offline .vizon-chat-offline { display: grid; gap: 11px; }
.vizon-chat-panel.is-offline .vizon-chat-presence { border-color: rgba(216, 183, 123, .32); background: rgba(216, 183, 123, .13); color: #ead6a7; }
.vizon-chat-panel.is-offline .vizon-chat-presence::before { background: #d8b77b; }
.vizon-chat-offline-copy { margin-bottom: 2px; }
.vizon-chat-offline-copy strong { color: #17211d; font-size: 15px; }
.vizon-chat-offline-copy p { margin: 5px 0 0; color: #66736c; font-size: 12px; line-height: 1.55; }
.vizon-chat-offline label { display: grid; gap: 5px; color: #53605a; font-size: 11px; font-weight: 700; }
.vizon-chat-offline input,
.vizon-chat-offline textarea { width: 100%; border: 1px solid #d7ded8; border-radius: 10px; background: #fff; padding: 9px 10px; color: #17211d; font: 13px Arial, sans-serif; }
.vizon-chat-offline textarea { min-height: 82px; resize: vertical; }
.vizon-chat-offline-send { cursor: pointer; border: 0; border-radius: 10px; background: #102237; padding: 12px; color: #fff; font-size: 12px; font-weight: 700; }
.vizon-chat-offline-send:disabled { cursor: wait; opacity: .65; }
.vizon-chat-offline-status { min-height: 16px; margin: 0; color: #60716a; font-size: 11px; line-height: 1.35; }
.vizon-chat-offline-status.is-success { color: #158657; }
.vizon-chat-offline-status.is-error { color: #b45c55; }

.vizon-chat-input {
  min-height: 40px;
  max-height: 95px;
  flex: 1;
  resize: vertical;
  border: 1px solid #d7ded8;
  border-radius: 10px;
  padding: 9px 10px;
  font: 13px Arial, sans-serif;
}

.vizon-chat-send {
  cursor: pointer;
  border: 0;
  border-radius: 10px;
  background: #102237;
  padding: 11px 12px;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 560px) {
  #vizon-chat-widget { right: 14px; bottom: 14px; }
  .vizon-chat-panel { bottom: 58px; border-radius: 18px; }
  .vizon-chat-toggle { width: 42px; height: 42px; border-radius: 50%; }
}
