/* ════════════════════════════════════════════════════════
 * page-ai-recommend-bem.css — Turn B
 * BEM 元件層 for ai_recommend.html
 * scope: .ai-recommend-page
 * ════════════════════════════════════════════════════════ */

/* ── Hero header ────────────────────────────────────── */
.ai-recommend-page .ar-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--momo-space-2, 12px);
  padding: var(--momo-space-4, 20px);
  border: 1px solid var(--momo-border-strong);
  border-radius: var(--momo-radius-md, 8px);
  background: var(--momo-surface-raised);
  box-shadow: var(--momo-shadow-soft);
}
.ai-recommend-page .ar-hero__title { display: flex; flex-direction: column; gap: 4px; }
.ai-recommend-page .ar-hero__sub   { color: var(--momo-text-tertiary); }
.ai-recommend-page .ar-hero__actions {
  display: flex; align-items: center; gap: var(--momo-space-1, 8px);
}

/* ── Status pills ──────────────────────────────────── */
.ai-recommend-page .ar-status {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--momo-surface-2);
  color: var(--momo-text-tertiary);
  border: 1px solid var(--momo-border-subtle);
}
.ai-recommend-page .ar-status--ok   { background: var(--momo-warm-olive, #6f7a4a); color: var(--momo-on-accent, #fff8ef); border-color: transparent; }
.ai-recommend-page .ar-status--info { background: var(--momo-warm-caramel, #c96442); color: var(--momo-on-accent, #fff8ef); border-color: transparent; }
.ai-recommend-page .ar-status--off  { opacity: 0.7; }

/* ── Card head 變體（取代彩色 bg-* 漸層） ──────────── */
.ai-recommend-page .ar-card__head {
  padding: 0.5rem 1rem !important;
  font-weight: 800;
}
.ai-recommend-page .ar-card__head--accent {
  background: var(--momo-page-accent) !important;
  color: var(--momo-on-accent, #fff8ef) !important;
  border-bottom: none !important;
}
.ai-recommend-page .ar-card__head--accent h6 { color: var(--momo-on-accent, #fff8ef) !important; }
.ai-recommend-page .ar-card__head--success {
  background: var(--momo-warm-olive, #6f7a4a) !important;
  color: var(--momo-on-accent, #fff8ef) !important;
  border-bottom: none !important;
}
.ai-recommend-page .ar-card__head--success span { color: var(--momo-on-accent, #fff8ef); }
.ai-recommend-page .ar-card__head--soft {
  background: var(--momo-surface-raised) !important;
  color: var(--momo-text-strong) !important;
  border-bottom: 1px solid var(--momo-border-subtle) !important;
}
.ai-recommend-page .ar-card__head--soft h6,
.ai-recommend-page .ar-card__head--soft span {
  color: var(--momo-text-strong) !important;
}
.ai-recommend-page .ar-card__head--accent-soft {
  background: var(--momo-warm-honey-soft, rgba(242, 178, 90, 0.15)) !important;
}
.ai-recommend-page .ar-card__head--warn-soft {
  background: var(--momo-warm-caramel-soft, rgba(201, 100, 66, 0.12)) !important;
}
.ai-recommend-page .ar-card__step { opacity: 0.85; }

/* ── Card variant accent borders ──────────────────── */
.ai-recommend-page .ar-card--gen      { border-color: var(--momo-text-strong) !important; }
.ai-recommend-page .ar-card--result   { border-color: var(--momo-warm-olive, #6f7a4a) !important; }
.ai-recommend-page .ar-card--search   { border-color: var(--momo-warm-honey, #c89043) !important; }
.ai-recommend-page .ar-card--insights { border-color: var(--momo-warm-caramel, #c96442) !important; }
.ai-recommend-page .ar-card--trends   { border-color: var(--momo-warm-olive, #6f7a4a) !important; }

/* ── Dropdown / quick tags / keywords ──────────────── */
.ai-recommend-page .ar-dropdown { max-height: 300px; overflow-y: auto; }
.ai-recommend-page .ar-quick-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-recommend-page .ar-quick-tag,
.ai-recommend-page .ar-keyword {
  cursor: pointer;
  font-size: 0.72rem;
  transition: background-color 120ms;
}
.ai-recommend-page .ar-keywords {
  padding: var(--momo-space-1, 8px);
  background: var(--momo-surface-2);
  border-radius: var(--momo-radius-sm, 6px);
  max-height: 80px;
  overflow-y: auto;
}
.ai-recommend-page .ar-keyword-badge {
  background: var(--momo-surface-2) !important;
  color: var(--momo-text-strong) !important;
  border-color: var(--momo-border-subtle) !important;
}
.ai-recommend-page .ar-keyword-badge.is-selected {
  background: var(--momo-warm-caramel, #c96442) !important;
  color: var(--momo-on-accent, #fff8ef) !important;
  border-color: transparent !important;
}
.ai-recommend-page .ar-selected-count {
  background: var(--momo-surface-2) !important;
  color: var(--momo-text-tertiary) !important;
  border: 1px solid var(--momo-border-subtle);
}
.ai-recommend-page .ar-selected-count.is-active {
  background: var(--momo-page-accent) !important;
  color: var(--momo-on-accent, #fff8ef) !important;
  border-color: transparent;
}
.ai-recommend-page .ar-step-badge,
.ai-recommend-page .ar-semantic-badge,
.ai-recommend-page .ar-copy-badge,
.ai-recommend-page .ar-source-badge {
  color: var(--momo-on-accent, #fff8ef) !important;
  border-color: transparent !important;
}
.ai-recommend-page .ar-step-badge,
.ai-recommend-page .ar-semantic-badge--primary,
.ai-recommend-page .ar-copy-badge--primary,
.ai-recommend-page .ar-source-badge--ptt {
  background: var(--momo-page-accent) !important;
}
.ai-recommend-page .ar-semantic-badge--ok,
.ai-recommend-page .ar-copy-badge--ok,
.ai-recommend-page .ar-source-badge--dcard {
  background: var(--momo-warm-olive, #6f7a4a) !important;
}
.ai-recommend-page .ar-copy-badge--warn,
.ai-recommend-page .ar-source-badge--youtube {
  background: var(--momo-warm-honey, #c89043) !important;
  color: var(--momo-text-strong) !important;
}
.ai-recommend-page .ar-copy-badge--danger,
.ai-recommend-page .ar-source-badge--google-news {
  background: var(--momo-warm-rose, #a84428) !important;
}
.ai-recommend-page .ar-copy-badge--info,
.ai-recommend-page .ar-source-badge--ai {
  background: var(--momo-warm-terra, #a85d3d) !important;
}

/* ── Result body ───────────────────────────────────── */
.ai-recommend-page .ar-result__body { max-height: 400px; overflow-y: auto; }
.ai-recommend-page .ar-result__text {
  white-space: pre-wrap;
  line-height: 1.6;
  font-size: 0.9rem;
  color: var(--momo-text-strong);
}

/* ── Disabled label state ──────────────────────────── */
.ai-recommend-page .ar-disabled { opacity: 0.5; }

/* ── Scroll utilities ──────────────────────────────── */
.ai-recommend-page .ar-scroll-280 { max-height: 280px; overflow-y: auto; }
.ai-recommend-page .ar-scroll-300 { max-height: 300px; overflow-y: auto; }
.ai-recommend-page .ar-scroll-350 { max-height: 350px; overflow-y: auto; }

/* ── Loading overlay ───────────────────────────────── */
.ar-loading-overlay {
  position: fixed; top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(42, 37, 32, 0.72);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.ar-loading-overlay__inner {
  text-align: center;
  color: var(--momo-on-accent, #fff8ef);
}
.ar-loading-overlay .spinner-border-lg {
  width: 3rem; height: 3rem; border-width: 0.3em;
}
