/* ============================================================
 * CLIB FDE V17-Pro 模块1-3高级功能 样式
 * 品牌色 var(--indigo)，只做加法
 * ============================================================ */

/* ---------- 通用弹窗 ---------- */
.pro-modal-mask {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: proFadeIn 0.2s ease;
}
@keyframes proFadeIn { from { opacity: 0; } to { opacity: 1; } }
.pro-modal {
  background: var(--card); border-radius: 16px;
  width: 100%; max-width: 420px;
  max-height: 85vh; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: proSlideUp 0.25s ease;
}
@keyframes proSlideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.pro-modal-sm { max-width: 320px; }
.pro-modal-lg { max-width: 480px; }
.pro-modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.pro-modal-hd h4 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); }
.pro-modal-x {
  background: none; border: none; font-size: 18px;
  cursor: pointer; color: var(--ink-3); padding: 4px 8px;
  border-radius: 6px;
}
.pro-modal-x:hover { background: var(--bg-soft); color: var(--ink); }
.pro-modal-bd { padding: 16px 20px; overflow-y: auto; }

/* ---------- 转发列表 ---------- */
.pro-forward-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s;
}
.pro-forward-item:hover { background: var(--bg-soft); }
.pro-fwd-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--indigo); color: var(--card);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 600; flex-shrink: 0;
}

/* ---------- 输入中状态 ---------- */
.pro-typing-indicator {
  color: var(--indigo); font-size: 12px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 2px;
}
.pro-typing-dots i {
  display: inline-block; font-style: normal;
  animation: proBlink 1.4s infinite;
}
.pro-typing-dots i:nth-child(2) { animation-delay: 0.2s; }
.pro-typing-dots i:nth-child(3) { animation-delay: 0.4s; }
@keyframes proBlink { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }

/* ---------- 引用回复栏 ---------- */
.pro-quote-bar {
  display: none; align-items: center;
  padding: 6px 12px; background: var(--bg-soft);
  border-left: 3px solid var(--indigo);
  border-radius: 8px; margin-bottom: 6px;
}
.pro-quote-inner {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
}
.pro-quote-text {
  font-size: 12px; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pro-quote-cancel {
  background: none; border: none; cursor: pointer;
  color: var(--ink-3); font-size: 14px; padding: 2px 6px;
}

/* ---------- 消息高亮（跳转定位） ---------- */
.pro-bubble-highlight {
  animation: proHighlight 2s ease;
}
@keyframes proHighlight {
  0%, 100% { background: inherit; }
  30% { background: rgba(79,107,237,0.15); }
}

/* ---------- 批量删除模式 ---------- */
.pro-multi-bar {
  display: none; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: var(--card);
  border-top: 1px solid var(--line);
}
.v17-bubble.pro-selectable { cursor: pointer; position: relative; }
.v17-bubble.pro-selectable::before {
  content: ''; position: absolute; left: -20px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--ink-4); background: var(--card);
}
.v17-bubble.pro-selected::before {
  background: var(--indigo); border-color: var(--indigo);
}

/* ---------- 表情包面板 ---------- */
.pro-sticker-panel {
  position: absolute; bottom: 60px; left: 0; right: 0;
  background: var(--card); border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  z-index: var(--z-base);
  max-height: 280px; overflow-y: auto;
}
.pro-sticker-hd {
  padding: 10px 16px; font-size: 13px; font-weight: 600;
  color: var(--ink-2); border-bottom: 1px solid var(--bg-soft);
}
.pro-sticker-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px; padding: 12px;
}
.pro-sticker-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 4px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s;
}
.pro-sticker-item:hover { background: var(--bg-soft); }

/* ---------- 回执详情 ---------- */
.pro-receipt-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--bg-soft);
}
.pro-receipt-label { font-size: 14px; color: var(--ink-2); }
.pro-receipt-num { font-size: 18px; font-weight: 700; }
.pro-receipt-num.ok { color: var(--success); }
.pro-receipt-num.err { color: var(--error); }

/* ---------- 匹配成功弹窗 ---------- */
.pro-match-overlay {
  position: fixed; inset: 0; z-index: var(--z-modal);
  background: rgba(79,107,237,0.3);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: proFadeIn 0.3s ease;
}
.pro-match-modal {
  background: var(--card); border-radius: 20px;
  width: 100%; max-width: 380px;
  padding: 32px 24px; text-align: center;
  box-shadow: 0 20px 60px rgba(79,107,237,0.3);
  animation: proMatchPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes proMatchPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.pro-match-celebrate {
  font-size: 56px; margin-bottom: 8px;
  animation: proBounce 0.6s ease;
}
@keyframes proBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.pro-match-modal h2 {
  margin: 0 0 8px; font-size: 22px; color: var(--ink);
}
.pro-match-modal p {
  margin: 0 0 16px; font-size: 14px; color: var(--ink-2);
}
.pro-match-icebreakers {
  text-align: left; margin-top: 12px;
}
.pro-ice-item {
  padding: 10px 12px; background: var(--bg-soft);
  border-radius: 10px; font-size: 13px; color: var(--ink);
  margin-bottom: 6px; cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.pro-ice-item:hover {
  background: var(--indigo-50); border-color: var(--indigo);
  color: var(--indigo);
}

/* ---------- 匹配历史 ---------- */
.pro-hist-tabs {
  display: flex; gap: 8px;
  border-bottom: 1px solid var(--line);
}
.pro-hist-tab {
  padding: 8px 16px; background: none; border: none;
  font-size: 14px; color: var(--ink-3); cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.pro-hist-tab.on {
  color: var(--indigo); font-weight: 600;
  border-bottom-color: var(--indigo);
}
.pro-hist-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s;
}
.pro-hist-item:hover { background: var(--bg-soft); }

/* ---------- 搭子看板 ---------- */
.pro-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.pro-stat-card {
  background: var(--bg-soft); border-radius: 12px;
  padding: 16px; text-align: center;
}
.pro-stat-num {
  font-size: 28px; font-weight: 700; color: var(--indigo);
}
.pro-stat-label {
  font-size: 12px; color: var(--ink-3); margin-top: 4px;
}

/* ---------- 兴趣标签 ---------- */
.pro-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px; border-radius: 20px;
  font-size: 13px; cursor: default;
}
.pro-tag-active {
  background: var(--indigo-50); color: var(--indigo);
  border: 1px solid var(--indigo);
}
.pro-tag button {
  background: none; border: none; cursor: pointer;
  color: var(--indigo); font-size: 12px; padding: 0 2px;
}

/* ---------- 设置行 ---------- */
.pro-setting-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid var(--bg-soft);
  font-size: 14px; color: var(--ink-2);
}
.pro-setting-row input[type="time"],
.pro-setting-row input[type="text"],
.pro-setting-row select {
  padding: 6px 10px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 13px; outline: none;
}
.pro-setting-row input[type="time"]:focus,
.pro-setting-row input[type="text"]:focus,
.pro-setting-row select:focus {
  border-color: var(--indigo);
}
.pro-setting-row input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--indigo);
}

/* ---------- 响应式：移动 390px ---------- */
@media (max-width: 480px) {
  .pro-modal { max-width: 100%; border-radius: 16px 16px 0 0; }
  .pro-match-modal { max-width: 100%; margin: 16px; }
  .pro-sticker-grid { grid-template-columns: repeat(3, 1fr); }
  .pro-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .pro-stat-num { font-size: 22px; }
  .pro-modal-bd { padding: 12px 16px; }
}

/* ---------- 防止横向溢出 ---------- */
.pro-modal-mask, .pro-match-overlay {
  max-width: 100vw;
  overflow-x: hidden;
}
.pro-modal, .pro-match-modal {
  max-width: calc(100vw - 32px);
  overflow-x: hidden;
}
