@keyframes aiBtnGradientFlow {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

@keyframes aiRainbowShift {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 200% 50%;
  }
}

.aiBtn,
.aiFabStrip {
  color: #fff;
  border: none;
  background-image: linear-gradient(
    135deg,
    #2dd4bf 0%,
    #38bdf8 12%,
    #4338ca 28%,
    #9333ea 44%,
    #ec4899 58%,
    #f97316 72%,
    #fb923c 86%,
    #facc15 100%
  );
  background-size: 250% 250%;
  background-position: 0% 50%;
  animation: aiBtnGradientFlow 18s ease-in-out infinite;
  box-shadow:
    0 4px 16px rgba(67, 56, 202, 0.28),
    0 0 24px rgba(236, 72, 153, 0.16);
  transition: box-shadow 0.3s ease, opacity 0.2s;
}

.aiBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.aiBtn:hover:not(:disabled),
.aiFabStrip:hover {
  box-shadow:
    0 6px 20px rgba(67, 56, 202, 0.34),
    0 0 32px rgba(236, 72, 153, 0.22);
}

.aiBtn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  animation-play-state: paused;
}

.aiFabStrip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow:
    0 8px 24px rgba(67, 56, 202, 0.3),
    0 0 32px rgba(236, 72, 153, 0.18);
}

.aiPromptField textarea:focus,
textarea.aiPromptTextarea:focus {
  border: 2px solid transparent;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.94)),
    linear-gradient(
      90deg,
      #ff375f 0%,
      #ff8a00 14%,
      #ffd60a 28%,
      #30d158 42%,
      #64d2ff 56%,
      #0a84ff 70%,
      #bf5af2 84%,
      #ff375f 100%
    );
  background-size: auto, 200% 100%;
  background-origin: border-box;
  background-clip: padding-box, border-box;
  animation: aiRainbowShift 4s linear infinite;
  box-shadow:
    0 0 0 1px rgba(191, 90, 242, 0.14),
    0 0 16px rgba(255, 55, 95, 0.32),
    0 0 28px rgba(10, 132, 255, 0.24),
    0 0 42px rgba(191, 90, 242, 0.18);
}

@media (max-width: 768px) {
  .aiFabStrip {
    height: 52px;
    padding: 0 16px;
    font-size: 13px;
  }

  .aiFabStrip span {
    display: none;
  }
}
