.support-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  font-family: inherit;
}

.support-button {
  position: relative;
  display: flex;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  font-size: 24px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.38);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.support-button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.46);
}

.support-button:focus-visible,
.support-close:focus-visible,
.support-send:focus-visible {
  outline: 3px solid rgba(59, 130, 246, 0.32);
  outline-offset: 3px;
}

.support-popup {
  position: absolute;
  right: 0;
  bottom: 80px;
  width: min(320px, calc(100vw - 32px));
  overflow: hidden;
  color: #1f2937;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.96);
  transform-origin: bottom right;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
  pointer-events: none;
}

.support-popup.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.support-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
}

.support-avatar {
  display: flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
}

.support-info h4 {
  margin: 0;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.support-info p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

.support-close {
  display: flex;
  width: 34px;
  height: 34px;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #fff;
  font-size: 18px;
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
}

.support-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.support-body {
  padding: 20px;
}

.support-message {
  margin: 0 0 16px;
  padding: 12px;
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
  background: #f1f5f9;
  border-radius: 12px;
}

.support-input {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding: 12px;
  color: #1f2937;
  font: inherit;
  font-size: 14px;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  box-sizing: border-box;
}

textarea.support-input {
  min-height: 110px;
  resize: vertical;
}

.support-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
  outline: none;
}

.support-send {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  background: #3b82f6;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition: background 180ms ease;
}

.support-send:hover {
  background: #2563eb;
}

.support-send:disabled {
  background: #94a3b8;
  cursor: wait;
}

@media (max-width: 768px) {
  .support-widget {
    right: 16px;
    bottom: 16px;
  }

  .support-popup {
    position: fixed;
    right: 12px;
    bottom: 90px;
    left: 12px;
    width: auto;
    max-height: 80vh;
    overflow-y: auto;
    transform-origin: bottom center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .support-button,
  .support-popup {
    transition: none;
  }
}
