
.svaey-chat-toggle,
.svaey-chat-widget,
.svaey-chat-widget * {
  box-sizing: border-box;
}

.svaey-chat-toggle {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 72px;
  height: 72px;
  border: 4px solid #ffffff;
  border-radius: 50%;
  background: #1f2430;
  color: #ffffff;
  cursor: pointer;
  z-index: 9999;
  display: grid;
  place-items: center;
  box-shadow:
    0 18px 45px rgba(31, 36, 48, 0.28),
    0 0 0 rgba(195, 170, 191, 0);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.svaey-chat-toggle:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow:
    0 18px 45px rgba(31, 36, 48, 0.32),
    0 0 28px rgba(195, 170, 191, 0.75),
    0 0 46px rgba(155, 232, 242, 0.45),
    0 0 64px rgba(255, 240, 184, 0.28);
}

.svaey-chat-toggle svg {
  width: 34px;
  height: 34px;
  color: #ffffff;
}

.svaey-chat-widget {
  position: fixed;
  right: 28px;
  bottom: 118px;
  width: min(410px, calc(100vw - 32px));
  height: 620px;
  max-height: calc(100vh - 145px);
  z-index: 9998;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 34px;
  background: #1f2430;
  border: 4px solid #ffffff;
  box-shadow:
    0 28px 90px rgba(31, 36, 48, 0.34),
    0 0 36px rgba(195, 170, 191, 0.28),
    0 0 58px rgba(155, 232, 242, 0.2);
  font-family: Arial, sans-serif;
}

.svaey-chat-widget.open {
  display: flex;
}

.svaey-chat-header {
  padding: 18px;
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background:
    radial-gradient(circle at 18% 0%, rgba(195, 170, 191, 0.22), transparent 35%),
    radial-gradient(circle at 88% 12%, rgba(155, 232, 242, 0.16), transparent 32%),
    #1f2430;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.svaey-chat-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.svaey-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #ffffff;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow:
    0 8px 22px rgba(0, 0, 0, 0.28),
    inset 0 0 0 2px rgba(255, 255, 255, 0.75);
}

.svaey-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.svaey-chat-brand h2 {
  margin: 0;
  font-size: 19px;
  line-height: 1.1;
  color: #ffffff;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.svaey-chat-brand p {
  margin: 4px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
}

.svaey-chat-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.svaey-chat-messages {
  flex: 1;
  padding: 20px 18px;
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 20%, rgba(195, 170, 191, 0.08), transparent 30%),
    #101722;
}

.svaey-msg {
  max-width: 84%;
  margin-bottom: 13px;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.svaey-msg.bot {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 7px;
}

.svaey-msg.user {
  margin-left: auto;
  border-bottom-right-radius: 7px;
  background: linear-gradient(
    135deg,
    rgba(190, 244, 238, 0.96),
    rgba(232, 197, 246, 0.92),
    rgba(255, 240, 184, 0.9),
    rgba(155, 232, 242, 0.94)
  );
  color: #1f2430;
  font-weight: 500;
}

.svaey-msg p {
  margin: 0 0 10px;
}

.svaey-msg p:last-child {
  margin-bottom: 0;
}

.svaey-msg ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.svaey-msg li {
  margin-bottom: 4px;
}

.svaey-msg a {
  color: inherit;
  text-decoration: underline;
}

.svaey-typing-msg {
  width: fit-content;
  margin-bottom: 13px;
  padding: 11px 13px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.svaey-typing {
  display: flex;
  gap: 6px;
  align-items: center;
}

.svaey-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.72);
  animation: svaeyBounce 1.2s infinite ease-in-out;
}

.svaey-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.svaey-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes svaeyBounce {
  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.45;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.svaey-input-wrap {
  padding: 14px;
  background: #1f2430;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.svaey-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
}

.svaey-chat-input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 10px 10px;
  font-size: 16px;
  background: transparent;
  color: #ffffff;
}

.svaey-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.42);
}

.svaey-send-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: #1f2430;
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.24),
    inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.svaey-send-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.68);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.24),
    0 0 18px rgba(195, 170, 191, 0.38),
    0 0 28px rgba(155, 232, 242, 0.22);
}

.svaey-send-btn svg {
  width: 20px;
  height: 20px;
  color: #ffffff;
}

.svaey-chat-widget button:disabled,
.svaey-chat-widget input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.svaey-powered {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.42);
  margin-top: 10px;
}

.svaey-powered strong {
  background: linear-gradient(90deg, #9be8f2, #c3aabf, #fff0b7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 700;
}

@media (max-width: 520px) {
  .svaey-chat-widget {
    right: 12px;
    bottom: 96px;
    width: calc(100vw - 24px);
    height: 72vh;
    border-radius: 28px;
  }

  .svaey-chat-toggle {
    right: 18px;
    bottom: 18px;
  }
}
@media (max-width: 520px) {
  .svaey-chat-widget.open {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100svh;
    max-height: 100svh;
    border: 0;
    border-radius: 0;
  }

  .svaey-chat-messages {
    overscroll-behavior: contain;
  }

  .svaey-input-wrap {
    flex-shrink: 0;
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }

  .svaey-chat-toggle {
    right: 18px;
    bottom: 18px;
  }
}