/* ════════════════════════════════
   飞溯 - 按钮系统
   方案 A: Pill 风格（现有风格统一化）
════════════════════════════════ */

/* ─── 基础 Pill 按钮 ────────────────── */
.pill {
  height: 48px;
  border-radius: 24px;
  border: none;
  font-family: var(--sans, 'DM Sans', sans-serif);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 28px;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.pill:active {
  opacity: 0.82;
  transform: scale(0.98);
}

/* ─── Primary: 金色实心 ────────────────── */
.pill-gold {
  background: var(--gold, #c8a96e);
  color: var(--night, #0b0a08);
}

.pill-gold:hover {
  background: var(--gold2, #e8d098);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(200, 169, 110, 0.25);
}

.pill-gold:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ─── Secondary: 描边幽灵 ────────────────── */
.pill-ghost {
  background: transparent;
  border: 1px solid var(--mist3, rgba(238, 232, 216, 0.25));
  color: var(--mist, rgba(238, 232, 216, 0.8));
}

.pill-ghost:hover {
  border-color: var(--mist, rgba(238, 232, 216, 0.8));
  background: var(--mist4, rgba(238, 232, 216, 0.05));
  color: var(--cream, #eee8d8);
}

.pill-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ─── Icon: 圆形图标按钮 ────────────────── */
.pill-icon {
  width: 48px;
  height: 48px;
  padding: 0;
  border-radius: 50%;
  background: var(--ink2, #2a261e);
  border: 1px solid var(--mist3, rgba(238, 232, 216, 0.25));
  color: var(--mist, rgba(238, 232, 216, 0.8));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-icon:hover {
  border-color: var(--mist, rgba(238, 232, 216, 0.8));
  background: var(--ink2, #2a261e);
  color: var(--cream, #eee8d8);
}

/* ─── 尺寸变体 ────────────────── */
.pill.sm {
  height: 40px;
  border-radius: 20px;
  font-size: 13px;
  padding: 0 20px;
}

.pill.sm.pill-icon {
  width: 40px;
  height: 40px;
}

.pill.lg {
  height: 56px;
  border-radius: 28px;
  font-size: 15px;
  padding: 0 36px;
}

.pill.lg.pill-icon {
  width: 56px;
  height: 56px;
}

/* ─── 加载状态 ────────────────── */
.pill.loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.pill.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: pill-spin 0.6s linear infinite;
}

@keyframes pill-spin {
  to { transform: rotate(360deg); }
}

/* ─── 图标样式 ────────────────── */
.pill .icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

/* ─── 响应式适配 ────────────────── */
@media (max-width: 768px) {
  .pill {
    height: 44px;
    padding: 0 24px;
    font-size: 14px;
  }

  .pill.sm {
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
  }

  .pill.lg {
    height: 52px;
    padding: 0 32px;
  }
}
