.yv-chatbot,
.yv-chatbot * {
  box-sizing: border-box;
}

.yv-chatbot {
  --yv-chat-bg: #0b0f14;
  --yv-chat-surface: #121b27;
  --yv-chat-surface-strong: #172334;
  --yv-chat-text: #f4f8fc;
  --yv-chat-muted: #b7c5d4;
  --yv-chat-border: rgba(255, 255, 255, 0.12);
  --yv-chat-accent: #38bdf8;
  --yv-chat-accent-strong: #0369a1;
  position: relative;
  z-index: 1080;
  font-family: Arial, Helvetica, sans-serif;
}

.yv-chatbot-launcher {
  position: fixed;
  right: 18px;
  bottom: 72px;
  z-index: 1080;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 17px;
  color: #ffffff;
  background: linear-gradient(135deg, #075985, #0369a1);
  border: 1px solid rgba(125, 211, 252, 0.45);
  border-radius: 999px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.yv-chatbot-launcher:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #0369a1, #0284c7);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.42);
}

.yv-chatbot-launcher:focus-visible,
.yv-chatbot-close:focus-visible,
.yv-chatbot-suggestions button:focus-visible,
.yv-chatbot-form input:focus-visible,
.yv-chatbot-send:focus-visible,
.yv-chatbot-fallback-cta:focus-visible {
  outline: 3px solid #7dd3fc;
  outline-offset: 3px;
}

.yv-chatbot-launcher svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yv-chatbot-panel[hidden] {
  display: none !important;
}

.yv-chatbot-panel {
  position: fixed;
  right: 18px;
  bottom: 132px;
  z-index: 1085;
  display: flex;
  flex-direction: column;
  width: min(410px, calc(100vw - 32px));
  height: min(620px, calc(100vh - 160px));
  min-height: 460px;
  overflow: hidden;
  color: var(--yv-chat-text);
  background: rgba(11, 15, 20, 0.98);
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
}

.yv-chatbot-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 15px;
  background: linear-gradient(145deg, #121b27, #0f1720);
  border-bottom: 1px solid var(--yv-chat-border);
}

.yv-chatbot-kicker {
  margin: 0 0 3px;
  color: var(--yv-chat-accent);
  font-size: 0.69rem;
  font-weight: 850;
  letter-spacing: 0.12em;
}

.yv-chatbot-header h2 {
  margin: 0;
  color: #ffffff;
  font-size: 1.1rem;
  line-height: 1.25;
}

.yv-chatbot-header p:not(.yv-chatbot-kicker) {
  margin: 5px 0 0;
  color: var(--yv-chat-muted);
  font-size: 0.79rem;
  line-height: 1.4;
}

.yv-chatbot-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0 0 2px;
  color: #dbe7f2;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--yv-chat-border);
  border-radius: 10px;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.yv-chatbot-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.yv-chatbot-evidence-note {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  color: #b9c8d7;
  background: rgba(56, 189, 248, 0.055);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.72rem;
  line-height: 1.35;
}

.yv-chatbot-evidence-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.12);
}

.yv-chatbot-messages {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 16px 16px 8px;
  scroll-behavior: smooth;
}

.yv-chatbot-message {
  width: fit-content;
  max-width: 88%;
  margin: 0 0 11px;
  padding: 11px 13px;
  border-radius: 15px;
  font-size: 0.88rem;
  line-height: 1.52;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.yv-chatbot-message-assistant {
  margin-right: auto;
  color: #eaf1f7;
  background: var(--yv-chat-surface-strong);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom-left-radius: 5px;
}

.yv-chatbot-message-user {
  margin-left: auto;
  color: #ffffff;
  background: #075985;
  border: 1px solid rgba(125, 211, 252, 0.22);
  border-bottom-right-radius: 5px;
}

.yv-chatbot-message a {
  color: #7dd3fc;
  text-decoration: underline;
  text-underline-offset: 2px;
  overflow-wrap: anywhere;
}

.yv-chatbot-message a:hover,
.yv-chatbot-message a:focus {
  color: #bae6fd;
}

.yv-chatbot-fallback {
  display: flex;
  margin: -2px 0 13px;
}

.yv-chatbot-fallback-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  color: #ffffff;
  background: var(--yv-chat-accent-strong);
  border: 1px solid rgba(125, 211, 252, 0.35);
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.24);
}

.yv-chatbot-fallback-cta:hover {
  color: #ffffff;
  background: #075985;
  transform: translateY(-1px);
}

.yv-chatbot-typing {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 56px;
  min-height: 38px;
}

.yv-chatbot-typing span {
  width: 6px;
  height: 6px;
  background: #9fb1c2;
  border-radius: 50%;
  animation: yv-chatbot-dot 1.1s infinite ease-in-out;
}

.yv-chatbot-typing span:nth-child(2) {
  animation-delay: 0.14s;
}

.yv-chatbot-typing span:nth-child(3) {
  animation-delay: 0.28s;
}

.yv-chatbot-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 4px 16px 12px;
}

.yv-chatbot-suggestions[hidden] {
  display: none !important;
}

.yv-chatbot-suggestions button {
  min-height: 34px;
  padding: 6px 10px;
  color: #d8e7f2;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.yv-chatbot-suggestions button:hover {
  color: #ffffff;
  background: rgba(56, 189, 248, 0.16);
}

.yv-chatbot-form {
  display: flex;
  gap: 9px;
  padding: 12px 14px 8px;
  border-top: 1px solid var(--yv-chat-border);
}

.yv-chatbot-form input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 10px 12px;
  color: #f5f9fc;
  background: #101923;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  font-size: 0.88rem;
}

.yv-chatbot-form input::placeholder {
  color: #8799a9;
}

.yv-chatbot-form input:disabled {
  opacity: 0.65;
}

.yv-chatbot-send {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #ffffff;
  background: var(--yv-chat-accent-strong);
  border: 1px solid #075985;
  border-radius: 12px;
  cursor: pointer;
}

.yv-chatbot-send:hover:not(:disabled) {
  background: #075985;
}

.yv-chatbot-send:disabled {
  cursor: wait;
  opacity: 0.6;
}

.yv-chatbot-send svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.yv-chatbot-disclaimer {
  margin: 0;
  padding: 0 14px 11px;
  color: #7f92a4;
  font-size: 0.66rem;
  line-height: 1.35;
  text-align: center;
}

.yv-chatbot-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@keyframes yv-chatbot-dot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.45;
  }
  30% {
    transform: translateY(-3px);
    opacity: 1;
  }
}

@media (max-width: 575.98px) {
  .yv-chatbot-launcher {
    right: 16px;
    bottom: 70px;
  }

  .yv-chatbot-panel {
    right: 16px;
    bottom: 128px;
    width: calc(100vw - 32px);
    height: min(70vh, 620px);
    min-height: 430px;
    border-radius: 18px;
  }

  .yv-chatbot-header {
    padding: 16px 16px 13px;
  }

  .yv-chatbot-evidence-note {
    padding-inline: 16px;
  }
}

@media (max-height: 650px) {
  .yv-chatbot-panel {
    bottom: 74px;
    height: calc(100vh - 96px);
    min-height: 0;
  }

  .yv-chatbot-launcher {
    bottom: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yv-chatbot-launcher,
  .yv-chatbot-messages,
  .yv-chatbot-typing span {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
