.support-chat-widget {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1090;
  font-family: "Manrope", "Source Sans 3", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #fff8e8;
}

.support-chat-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 112px;
  min-height: 56px;
  padding: 0.42rem 0.95rem 0.42rem 0.42rem;
  border: 1px solid rgba(241, 217, 143, 0.74);
  border-radius: 999px;
  color: #fffaf0;
  background:
    linear-gradient(135deg, rgba(20, 14, 6, 0.96), rgba(16, 92, 54, 0.92)),
    #0d0d0d;
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(37, 211, 102, 0.2) inset,
    0 0 26px rgba(37, 211, 102, 0.22);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.78);
  transition:
    opacity 0.34s ease,
    visibility 0.34s ease,
    transform 0.34s cubic-bezier(0.18, 0.9, 0.26, 1.22),
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.support-chat-widget.is-ready .support-chat-toggle {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.support-chat-toggle:hover,
.support-chat-toggle:focus-visible {
  border-color: rgba(255, 236, 178, 0.96);
  box-shadow:
    0 22px 44px rgba(0, 0, 0, 0.48),
    0 0 0 1px rgba(241, 217, 143, 0.28) inset,
    0 0 38px rgba(37, 211, 102, 0.34);
  transform: translateY(-4px) scale(1.04);
  outline: none;
}

.support-chat-widget.is-open .support-chat-toggle {
  transform: translateY(0) scale(0.96);
}

.support-chat-pulse {
  position: absolute;
  inset: -8px;
  z-index: -1;
  border: 1px solid rgba(37, 211, 102, 0.5);
  border-radius: inherit;
  animation: support-chat-ripple 2.35s ease-out infinite;
}

.support-chat-toggle-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  border-radius: 50%;
  color: #ffffff;
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.48), transparent 26%),
    linear-gradient(135deg, #25d366, #128c4b);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    0 8px 18px rgba(37, 211, 102, 0.32),
    0 0 0 4px rgba(37, 211, 102, 0.12);
  font-size: 1.35rem;
  animation: support-chat-attention 4.8s ease-in-out 1.1s infinite;
}

.support-chat-toggle-text {
  color: var(--gold-300, #f1d98f);
  font-size: 0.86rem;
  font-weight: 800;
}

.support-chat-panel {
  position: absolute;
  right: 0;
  bottom: 4.75rem;
  width: min(355px, calc(100vw - 2rem));
  border: 1px solid rgba(224, 183, 94, 0.52);
  border-radius: 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(212, 175, 55, 0.2), transparent 38%),
    linear-gradient(155deg, rgba(12, 10, 8, 0.98), rgba(18, 29, 21, 0.98));
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  opacity: 0;
  visibility: hidden;
  transform: translateY(18px) scale(0.94);
  transform-origin: bottom right;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s cubic-bezier(0.18, 0.9, 0.26, 1.08);
}

.support-chat-widget.is-open .support-chat-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.support-chat-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(37, 211, 102, 0.08));
  border-bottom: 1px solid rgba(224, 183, 94, 0.26);
}

.support-chat-avatar {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #2b1a04;
  background: linear-gradient(135deg, #f1d98f, #c89a38);
  box-shadow: 0 10px 18px rgba(212, 175, 55, 0.24);
  font-size: 1.35rem;
}

.support-chat-eyebrow {
  margin: 0 0 0.1rem;
  color: rgba(241, 217, 143, 0.84);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.support-chat-head h2 {
  margin: 0;
  color: #fff3c8;
  font-size: 1rem;
  font-weight: 800;
}

.support-chat-head span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(245, 241, 230, 0.76);
  font-size: 0.78rem;
}

.support-chat-head span i {
  color: #25d366;
  font-size: 0.48rem;
}

.support-chat-close {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(241, 217, 143, 0.28);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
}

.support-chat-close:hover {
  color: #ffffff;
  border-color: rgba(241, 217, 143, 0.62);
}

.support-chat-body {
  padding: 1rem;
}

.support-chat-bubble {
  width: fit-content;
  max-width: 88%;
  margin-bottom: 0.55rem;
  padding: 0.68rem 0.78rem;
  border-radius: 14px;
  color: rgba(255, 248, 232, 0.92);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.86rem;
  line-height: 1.35;
}

.support-chat-bubble.is-bot {
  border-bottom-left-radius: 4px;
}

.support-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.9rem 0;
}

.support-chat-quick button {
  border: 1px solid rgba(224, 183, 94, 0.38);
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  color: var(--gold-300, #f1d98f);
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.support-chat-quick button:hover {
  transform: translateY(-2px);
  border-color: rgba(241, 217, 143, 0.76);
  background: rgba(212, 175, 55, 0.12);
}

.support-chat-form {
  display: grid;
  gap: 0.65rem;
}

.support-chat-input {
  width: 100%;
  resize: none;
  border: 1px solid rgba(224, 183, 94, 0.34);
  border-radius: 12px;
  padding: 0.7rem 0.78rem;
  color: #fff8e8;
  background: rgba(0, 0, 0, 0.32);
  outline: none;
}

.support-chat-input::placeholder {
  color: rgba(255, 248, 232, 0.44);
}

.support-chat-input:focus {
  border-color: rgba(241, 217, 143, 0.82);
  box-shadow: 0 0 0 0.18rem rgba(212, 175, 55, 0.15);
}

.support-chat-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  border: 0;
  border-radius: 12px;
  color: #ffffff;
  background: linear-gradient(135deg, #25d366, #128c4b);
  box-shadow: 0 10px 22px rgba(37, 211, 102, 0.23);
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.support-chat-send:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(37, 211, 102, 0.3);
}

body.has-support-chat .to-top-btn {
  bottom: 5.25rem;
}

@keyframes support-chat-ripple {
  0% {
    transform: scale(0.78);
    opacity: 0.72;
  }
  72%,
  100% {
    transform: scale(1.18);
    opacity: 0;
  }
}

@keyframes support-chat-attention {
  0%,
  56%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  7% {
    transform: scale(1.12) rotate(0deg);
  }
  11% {
    transform: scale(1.08) rotate(-10deg);
  }
  15% {
    transform: scale(1.1) rotate(10deg);
  }
  19% {
    transform: scale(1.06) rotate(-8deg);
  }
  23% {
    transform: scale(1.08) rotate(8deg);
  }
  28% {
    transform: scale(1) rotate(0deg);
  }
}

@media (max-width: 576px) {
  .support-chat-widget {
    right: 0.78rem;
    bottom: 0.78rem;
  }

  .support-chat-panel {
    right: -0.1rem;
    bottom: 4.55rem;
    width: min(340px, calc(100vw - 1.35rem));
  }

  .support-chat-toggle {
    min-width: 58px;
    padding: 0.38rem;
  }

  .support-chat-toggle-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .support-chat-toggle-text {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .support-chat-pulse,
  .support-chat-toggle-icon {
    animation: none;
  }
}
