.vc-ai-chat {
  --vc-blue: #0445af;
  --vc-gold: #ffc532;
  --vc-cyan: #04b8d8;
  --vc-ink: #12233a;
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 99999;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  color: var(--vc-ink);
}

.vc-ai-chat__toggle {
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: linear-gradient(145deg, var(--vc-blue), #033894);
  color: #fff;
  box-shadow: 0 8px 24px rgba(4, 69, 175, 0.35);
  font-size: 22px;
  display: grid;
  place-items: center;
}

.vc-ai-chat__toggle:focus-visible {
  outline: 3px solid var(--vc-gold);
  outline-offset: 2px;
}

.vc-ai-chat__panel {
  position: absolute;
  right: 0;
  bottom: 68px;
  width: min(360px, calc(100vw - 24px));
  height: min(480px, calc(100dvh - 100px));
  background: #fff;
  border: 1px solid #d5e2f2;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(18, 35, 58, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.vc-ai-chat__panel[hidden] {
  display: none !important;
}

.vc-ai-chat__head {
  background: linear-gradient(135deg, #062a63, var(--vc-blue) 60%, #0a5f9e);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vc-ai-chat__head strong {
  font-size: 14px;
}

.vc-ai-chat__close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  min-width: 32px;
  min-height: 32px;
}

.vc-ai-chat__msgs {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  background: #f5f9ff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vc-ai-chat__bubble {
  max-width: 88%;
  padding: 8px 10px;
  border-radius: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.vc-ai-chat__bubble--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #d9e6f5;
  white-space: normal;
}

.vc-ai-chat__bubble--user {
  align-self: flex-end;
  background: var(--vc-blue);
  color: #fff;
}

.vc-ai-chat__link {
  color: var(--vc-blue);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.vc-ai-chat__link:hover,
.vc-ai-chat__link:focus-visible {
  color: #033894;
}

.vc-ai-chat__bubble--busy {
  opacity: 0.75;
  font-style: italic;
}

.vc-ai-chat__form {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid #e1ebf6;
  background: #fff;
}

.vc-ai-chat__form input {
  flex: 1;
  min-width: 0;
  border: 1px solid #c5d3e6;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
}

.vc-ai-chat__form button {
  border: 0;
  border-radius: 10px;
  background: var(--vc-gold);
  color: #12233a;
  font-weight: 700;
  padding: 0 14px;
  min-height: 44px;
  cursor: pointer;
}

.vc-ai-chat__form button:disabled {
  opacity: 0.6;
  cursor: wait;
}
