/**
 * 企业详情页「快速询盘」CTA 动效样式
 * 目标：在不改变按钮尺寸与页面布局的前提下，用低频、克制的动效提升点击欲望
 * 说明：纯 CSS 实现，无外部依赖；所有动效均可用 prefers-reduced-motion 关闭
 * 日期：2026-11-11
 */

.al-inquiry-cta {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.05rem;
  border: 0;
  border-radius: 999px;
  background-image: linear-gradient(135deg, var(--color-accent-2, #f9a03f) 0%, var(--color-accent, #e85d04) 62%);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 6px 16px -8px rgba(232, 93, 4, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  /* 呼吸光环：用 outline 而非伪元素盒阴影，避免被 overflow:hidden 裁掉 */
  animation: alInquiryHalo 3.2s ease-out infinite;
  transform: translateZ(0);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
}

/* 斜向高光扫过：每 5.6 秒一次，制造金属质感 */
.al-inquiry-cta::before {
  content: "";
  position: absolute;
  top: -20%;
  left: -70%;
  width: 42%;
  height: 140%;
  background-image: linear-gradient(100deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
  transform: skewX(-18deg);
  animation: alInquirySheen 5.6s ease-in-out infinite;
  pointer-events: none;
}

.al-inquiry-cta__icon {
  position: relative;
  z-index: 1;
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transform-origin: 50% 80%;
  animation: alInquiryNudge 5.6s ease-in-out infinite;
}

.al-inquiry-cta__label {
  position: relative;
  z-index: 1;
}

/* 悬停：轻微上浮 + 光晕增强；按下回弹 */
.al-inquiry-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 22px -10px rgba(232, 93, 4, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.32);
}

.al-inquiry-cta:active {
  transform: translateY(0) scale(0.985);
  box-shadow: 0 5px 12px -8px rgba(232, 93, 4, 0.8), inset 0 2px 6px rgba(120, 40, 0, 0.18);
}

/* 键盘聚焦：暂停呼吸动画，改用实心焦点环，保证可访问性 */
.al-inquiry-cta:focus-visible {
  animation: none;
  outline: 3px solid rgba(232, 93, 4, 0.5);
  outline-offset: 3px;
}

@keyframes alInquiryHalo {
  0% { outline: 2px solid rgba(232, 93, 4, 0.34); outline-offset: 0; }
  65%, 100% { outline: 2px solid rgba(232, 93, 4, 0); outline-offset: 9px; }
}

@keyframes alInquirySheen {
  0%, 62% { left: -70%; }
  82%, 100% { left: 130%; }
}

@keyframes alInquiryNudge {
  0%, 78%, 100% { transform: rotate(0deg) scale(1); }
  82% { transform: rotate(-12deg) scale(1.08); }
  86% { transform: rotate(9deg) scale(1.05); }
  90% { transform: rotate(0deg) scale(1); }
}

/* 弱动效偏好：保留配色与层级，仅关闭动效 */
@media (prefers-reduced-motion: reduce) {
  .al-inquiry-cta,
  .al-inquiry-cta::before,
  .al-inquiry-cta::after,
  .al-inquiry-cta__icon {
    animation: none !important;
    transition: none !important;
  }
}
