/* 右侧「产品体验」浮动入口 + 申请弹窗（ai-vision / ehs / sop 共用） */

.trial-fab {
  position: fixed;
  /* 避开 Banner（约 header + 500），落在下方白色内容区 */
  top: clamp(380px, calc(var(--header-h, 56px) + 500px + 120px), calc(100vh - 180px));
  left: calc(50% + var(--content-w, 1200px) / 2 + 24px);
  right: auto;
  z-index: 90;
  width: 128px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  filter: drop-shadow(0 8px 18px rgba(40, 70, 160, 0.28));
  transition: filter 0.22s ease;
}
.trial-fab:hover { filter: drop-shadow(0 12px 22px rgba(40, 70, 160, 0.36)); }

.trial-fab-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: trial-fab-float 2.8s ease-in-out infinite;
  will-change: transform;
}
.trial-fab:hover .trial-fab-inner { animation-duration: 2.2s; }

@keyframes trial-fab-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@media (prefers-reduced-motion: reduce) {
  .trial-fab-inner { animation: none; }
}

.trial-fab-orb {
  width: 108px;
  height: 108px;
  display: block;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

.trial-fab-label {
  margin-top: -8px;
  z-index: 2;
  min-width: 120px;
  height: 42px;
  padding: 0 20px;
  border-radius: 999px;
  background: #f4f7ff;
  border: 1px solid rgba(120, 150, 230, 0.28);
  box-shadow: 0 4px 12px rgba(60, 90, 180, 0.16);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.trial-fab-label > span {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  background-image: linear-gradient(90deg, #3b82f6 0%, #7c5cff 55%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.trial-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.trial-modal.is-open { display: flex; }
.trial-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.trial-modal-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}
.trial-modal-head {
  padding: 28px 28px 20px;
  background: linear-gradient(135deg, #edf3ff 0%, #f8faff 55%, #fff 100%);
  border-bottom: 1px solid #eef2f8;
}
.trial-modal-head h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--heading, #333);
  margin-bottom: 8px;
}
.trial-modal-head p {
  font-size: 13px;
  color: var(--muted, #999);
  line-height: 1.7;
}
.trial-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #8f959e;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}
.trial-modal-close:hover { color: var(--heading, #333); }
.trial-modal-body { padding: 24px 28px 28px; }
.trial-form-item { margin-bottom: 16px; }
.trial-form-item label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--heading, #333);
  margin-bottom: 8px;
}
.trial-form-item label span { color: #e34d59; margin-left: 2px; }
.trial-form-item input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #e5e6eb;
  background: #fff;
  font-size: 14px;
  color: var(--heading, #333);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.trial-form-item input:focus {
  border-color: var(--primary, #2b6de5);
  box-shadow: 0 0 0 3px rgba(43, 109, 229, 0.12);
}
.trial-form-tip {
  font-size: 12px;
  color: var(--muted, #999);
  line-height: 1.7;
  margin: 4px 0 18px;
  padding: 10px 12px;
  background: #f7f9fc;
  border-left: 3px solid var(--primary, #2b6de5);
}
.trial-form-submit {
  width: 100%;
  height: 44px;
  border: none;
  background: var(--primary, #2b6de5);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s;
}
.trial-form-submit:hover { background: #1e5fd4; }
.trial-form-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.trial-form-msg {
  display: none;
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.6;
  color: #2b6de5;
}
.trial-form-msg.is-error { color: #e34d59; }
.trial-form-msg.is-show { display: block; }

/* 提交成功态（附件2风格） */
.trial-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px 56px;
  min-height: 320px;
}
.trial-modal.is-success .trial-modal-head,
.trial-modal.is-success #trial-form { display: none; }
.trial-modal.is-success .trial-success { display: flex; }
.trial-success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #34c7a9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  flex-shrink: 0;
}
.trial-success-icon svg {
  width: 36px;
  height: 36px;
  display: block;
}
.trial-success-title {
  font-size: 22px;
  font-weight: 700;
  color: #1f2329;
  line-height: 1.4;
  margin: 0 0 12px;
}
.trial-success-desc {
  font-size: 14px;
  font-weight: 400;
  color: #8f959e;
  line-height: 1.7;
  margin: 0;
}

body.trial-modal-open { overflow: hidden; }

@media (max-width: 1240px) {
  .trial-fab {
    left: auto;
    right: 12px;
    width: 104px;
    top: clamp(300px, calc(var(--header-h, 56px) + 360px), calc(100vh - 160px));
  }
  .trial-fab-orb { width: 88px; height: 88px; }
  .trial-fab-label { min-width: 100px; height: 36px; padding: 0 14px; }
  .trial-fab-label > span { font-size: 15px; font-weight: 800; }
}
