/* SoluViewChat — scoped bottom-right widget (matches main design system) */

.sv-chat {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: #0b1220;
}

.sv-chat * { box-sizing: border-box; }

.sv-chat__launcher {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  animation: sv-chat-float 3.2s ease-in-out infinite;
}

.sv-chat__launcher:hover {
  animation: none;
  transform: translateY(-3px);
}

.sv-chat.is-open .sv-chat__launcher {
  animation: none;
  transform: translateY(0);
}

.sv-chat__teaser {
  padding: 9px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0a84ff 0%, #36a3ff 55%, #0066ff 110%);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  box-shadow: 0 12px 32px rgba(10, 132, 255, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
  animation: sv-chat-teaser-pulse 2.4s ease-in-out infinite;
  transition: opacity 200ms ease, transform 200ms ease;
}

.sv-chat__launcher:hover .sv-chat__teaser {
  animation: none;
  transform: scale(1.05);
}

.sv-chat.is-open .sv-chat__teaser {
  opacity: 0;
  transform: translateX(8px) scale(0.92);
  pointer-events: none;
}

.sv-chat__fab {
  width: 58px;
  height: 58px;
  border-radius: 20px;
  border: 1px solid rgba(10, 132, 255, 0.14);
  background: #fff;
  box-shadow: 0 16px 40px rgba(10, 132, 255, 0.2);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: box-shadow 180ms ease, border-color 180ms ease;
}

.sv-chat__launcher:hover .sv-chat__fab {
  box-shadow: 0 22px 52px rgba(10, 132, 255, 0.28);
  border-color: rgba(10, 132, 255, 0.28);
}

.sv-chat__fab-logo {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 4px 10px rgba(10, 132, 255, 0.12));
}

@keyframes sv-chat-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes sv-chat-teaser-pulse {
  0%,
  100% {
    box-shadow: 0 12px 32px rgba(10, 132, 255, 0.28);
  }
  50% {
    box-shadow: 0 16px 38px rgba(10, 132, 255, 0.38);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sv-chat__launcher,
  .sv-chat__teaser {
    animation: none;
  }
}

@media (max-width: 420px) {
  .sv-chat__teaser {
    font-size: 12px;
    padding: 8px 12px;
  }
}

.sv-chat__panel {
  position: absolute;
  right: 0;
  bottom: 72px;
  width: min(380px, calc(100vw - 36px));
  height: min(520px, calc(100vh - 120px));
  border-radius: 24px;
  border: 1px solid rgba(10,132,255,0.10);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(14px);
  box-shadow: 0 22px 70px rgba(11,18,32,0.16);
  overflow: hidden;
  transform-origin: bottom right;
  transform: translateY(10px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: transform 180ms ease, opacity 180ms ease;
}

.sv-chat.is-open .sv-chat__panel {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.sv-chat__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(11,18,32,0.08);
  background: rgba(255,255,255,0.72);
}

.sv-chat__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sv-chat__brand img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  filter: drop-shadow(0 10px 26px rgba(10, 132, 255, 0.18));
}

.sv-chat__brand b {
  font-size: 14px;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.sv-chat__brand span {
  display: block;
  font-size: 12px;
  color: rgba(11,18,32,0.58);
  margin-top: 1px;
}

.sv-chat__close {
  width: 36px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid rgba(11,18,32,0.10);
  background: rgba(255,255,255,0.8);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.sv-chat__close:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(11,18,32,0.10);
}

.sv-chat__body {
  height: calc(100% - 64px);
  display: grid;
  grid-template-rows: 1fr auto;
}

.sv-chat__messages {
  padding: 14px 14px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sv-chat__msg {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid rgba(11,18,32,0.08);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 10px 26px rgba(11,18,32,0.06);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.sv-chat__msg--user {
  align-self: flex-end;
  border-color: rgba(10,132,255,0.14);
  background: rgba(10,132,255,0.08);
}

.sv-chat__msg--assistant {
  align-self: flex-start;
}

.sv-chat__msg a.sv-chat__link {
  color: #0066ff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

.sv-chat__msg a.sv-chat__link:hover {
  color: #0a84ff;
}

.sv-chat__msg--user a.sv-chat__link {
  color: #0052cc;
}

.sv-chat__composer {
  padding: 12px 12px;
  border-top: 1px solid rgba(11,18,32,0.08);
  background: rgba(255,255,255,0.76);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.sv-chat__input {
  width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(11,18,32,0.10);
  padding: 12px 12px;
  font: inherit;
  font-size: 14px;
  outline: none;
  background: #fff;
}

.sv-chat__input:focus {
  border-color: rgba(10,132,255,0.28);
  box-shadow: 0 0 0 4px rgba(10,132,255,0.12);
}

.sv-chat__send {
  border-radius: 16px;
  border: 1px solid rgba(10,132,255,0.18);
  background: linear-gradient(135deg, #0A84FF 0%, #36A3FF 55%, #0066FF 110%);
  color: #fff;
  padding: 12px 14px;
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: 0 14px 34px rgba(10,132,255,0.20);
}

.sv-chat__send:hover { transform: translateY(-1px); box-shadow: 0 18px 44px rgba(10,132,255,0.24); }
.sv-chat__send:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }

.sv-chat__typing {
  font-size: 12px;
  color: rgba(11,18,32,0.60);
  padding: 0 14px 12px;
}

@media (max-width: 480px) {
  .sv-chat {
    right: 12px;
    bottom: 12px;
  }
  .sv-chat__panel {
    width: calc(100vw - 24px);
    height: min(540px, calc(100vh - 110px));
  }
}
