/* New Send Button Styles */
.send-btn {
  /* Brand theming based on site accent */
  --btn-bg: color-mix(in oklab, var(--accent, #4fd1c5) 88%, black 12%);
  --btn-bg-hover: color-mix(in oklab, var(--accent, #4fd1c5) 96%, black 4%);
  --btn-fg: #ffffff;
  --btn-shadow: 0 8px 28px
    color-mix(in oklab, var(--accent, #4fd1c5) 30%, transparent);
  --accent: var(--accent, #4fd1c5);
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 28px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: 700 16px/1.1 "Inter", system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: var(--btn-shadow);
  transform: translateZ(0);
  transition: transform 220ms var(--easing, ease), background 220ms ease,
    box-shadow 220ms ease, filter 220ms ease;
}

.send-btn:hover {
  background: var(--btn-bg-hover);
  transform: translateY(-2px);
}

.send-btn:active {
  transform: translateY(0);
}

.send-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
}

.send-btn__content {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
}

/* Label */
.send-btn__label {
  transition: opacity 200ms ease, transform 200ms var(--easing, ease);
}

/* Spinner */
.send-btn__spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  display: none;
  animation: sendbtn-spin 900ms linear infinite;
}

@keyframes sendbtn-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Checkmark */
.send-btn__check {
  width: 18px;
  height: 18px;
  color: #fff;
  display: none;
}

/* Progress bar (subtle) */
.send-btn::after {
  content: "";
  position: absolute;
  inset-inline: 8px;
  bottom: 6px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.55),
    rgba(255, 255, 255, 0.9)
  );
  transform: scaleX(0);
  transform-origin: left;
  opacity: 0;
}

/* States */
.send-btn.is-loading {
  filter: saturate(1.05);
}
.send-btn.is-loading .send-btn__label {
  opacity: 0.85;
  transform: translateY(1px);
}
.send-btn.is-loading .send-btn__spinner {
  display: inline-block;
}
.send-btn.is-loading::after {
  opacity: 0.8;
}

.send-btn.is-success {
  background: color-mix(in oklab, var(--accent, #4fd1c5) 78%, black 22%);
}
.send-btn.is-success .send-btn__spinner,
.send-btn.is-success .send-btn__label {
  display: none;
}

/* Dark mode tuning */
body.dark-mode .send-btn {
  --btn-bg: color-mix(in oklab, var(--accent, #4fd1c5) 82%, #0b1624 18%);
  --btn-bg-hover: color-mix(in oklab, var(--accent, #4fd1c5) 90%, #0b1624 10%);
  --btn-shadow: 0 10px 34px
    color-mix(in oklab, var(--accent, #4fd1c5) 35%, transparent);
}
.send-btn.is-success .send-btn__check {
  display: inline-flex;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .send-btn,
  .send-btn__label {
    transition: none !important;
    animation: none !important;
  }
  .send-btn::after {
    display: none;
  }
}
