/* The footer and Help panel styles (commonfiles/footer.php), moved out so pages stop carrying it inline; cached, versioned by rk_asset(). */
/* ── Help Panel Layout ───────────────────────────────────────────────── */
#panelHelp .slide-panel-content {
  width: 460px; display: flex; flex-direction: column; height: 100vh; max-height: 100vh;
}

/* Fixed header - always visible, title never changes */
#helpHd {
  flex-shrink: 0;
  background:#111827;
}
#helpHdTop {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 12px;
}
#helpHdTitleWrap { display: flex; align-items: center; gap: 10px; }
#helpHdIcon {
  width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255,255,255,.15); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
#helpHdLabel {
  font-size: 15px; font-weight: 800; color: #fff; letter-spacing: -.01em; display: block;
}
#helpHdSub {
  font-size: 11px; color: rgba(255,255,255,.5); display: block; margin-top: 1px;
}
#helpStory { margin:0 18px 14px; padding:10px 12px; border-radius:10px; background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12); }
#helpStory .hs-h { display:flex; justify-content:space-between; color:#fff !important; text-decoration:none !important; font-size:13px; margin-bottom:6px; }
#helpStory .hs-h span { color:rgba(255,255,255,.55); font-size:12px; }
#helpStory ol { list-style:none; margin:0; padding:0; display:grid; gap:4px; }
#helpStory li a { display:flex; gap:8px; align-items:center; font-size:12.5px; color:rgba(255,255,255,.8) !important; text-decoration:none !important; padding:3px 0; }
#helpStory li i { width:18px; height:18px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; font-size:11px; font-style:normal; font-weight:800; background:rgba(255,255,255,.12); color:#fff; flex:none; }
#helpStory li.done i { background:#16a34a; }
#helpStory li.cur a { color:#fde68a !important; font-weight:700; }
#helpStory li.cur i { background:#fbbf24; color:#0b0e14; }
#helpStory li em { margin-left:auto; font-style:normal; font-size:11.5px; color:#fbbf24; white-space:nowrap; }
#helpHdClose {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(255,255,255,.1); color: rgba(255,255,255,.7);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: background .15s, color .15s; flex-shrink: 0;
}
#helpHdClose:hover { background: rgba(255,255,255,.2); color: #fff; }

/* Page context pill - shown inside the header when on a known page */
#helpPageCtx {
  display: none; align-items: center; gap: 9px;
  margin: 0 18px 12px; padding: 8px 12px;
  background: rgba(255,255,255,.1); border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
}
#helpPageCtx.hp-visible { display: flex; }
#helpPageCtxIcon {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
#helpPageCtxLabel {
  flex: 1; font-size: 12.5px; font-weight: 700; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#helpPageCtxTag {
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,.45);
  text-transform: uppercase; letter-spacing: .06em; flex-shrink: 0;
}

/* Unified input row (always at bottom of panel) */
#helpUnifiedRow {
  flex-shrink: 0; display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 14px 14px; background: #fff; border-top: 1.5px solid #f1f5f9;
}
#helpUnifiedIcon {
  font-size: 16px; color: #94a3b8; flex-shrink: 0;
  align-self: center; margin-bottom: 2px;
}
#helpUnifiedInput {
  flex: 1; min-height: 36px; max-height: 100px; resize: none; overflow-y: auto;
  padding: 8px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px;
  font-size: 13px; color: #1e293b; background: #f8fafc; outline: none;
  transition: border-color .15s; line-height: 1.4; font-family: inherit;
}
#helpUnifiedInput:focus { border-color: #78350f; background: #fff; }
#helpUnifiedInput::placeholder { color: #94a3b8; }
#helpUnifiedClear {
  width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
  background: none; border: none; cursor: pointer; color: #94a3b8;
  display: none; align-items: center; justify-content: center; font-size: 16px;
  align-self: center; padding: 0;
}
#helpUnifiedClear:hover { color: #475569; }
#helpUnifiedSend {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background:#111827; border: none; cursor: pointer; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
#helpUnifiedSend:hover { background: #111827; }
#helpUnifiedSend:disabled { background: #e2e8f0; cursor: default; }

/* AI mode indicator strip */
#helpAiModeBar {
  display: none; flex-shrink: 0; align-items: center; justify-content: space-between;
  padding: 6px 14px; background: #f1f5f9; border-top: 1px solid #e2e8f0;
  font-size: 11px; font-weight: 700; color: #78350f;
}
#helpAiModeBar.hp-visible { display: flex; }
#helpAiModeBar button {
  background: none; border: none; color: #fbbf24; font-size: 11px;
  font-weight: 700; cursor: pointer; padding: 0;
}
#helpAiModeBar button:hover { color: #111827; }

/* Nav bar - back button shown when browsing a topic from the list */
#helpNavBar {
  display: none; align-items: center; gap: 10px;
  padding: 10px 18px; background: #fff;
  border-bottom: 1.5px solid #f1f5f9; flex-shrink: 0;
}
#helpNavBack {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px 5px 8px; border-radius: 20px;
  background: #f1f5f9; border: 1.5px solid #e2e8f0;
  font-size: 12px; font-weight: 600; color: #475569; cursor: pointer;
  transition: all .15s;
}
#helpNavBack:hover { background: #e2e8f0; color: #1e293b; }
#helpNavBack i { font-size: 11px; }
#helpNavTitle {
  font-size: 13px; font-weight: 700; color: #1e293b;
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Results label bar */
#helpResultsBar {
  display: none; padding: 9px 18px 8px; background: #f8fafc;
  border-bottom: 1px solid #f1f5f9; flex-shrink: 0;
}
#helpResultsLabel {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: .06em;
}

/* Body - single scrollable area */
#helpBody { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
#helpPanelBody { flex: 1; overflow-y: auto; }
#helpPanelBody::-webkit-scrollbar { width: 4px; }
#helpPanelBody::-webkit-scrollbar-track { background: transparent; }
#helpPanelBody::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
#helpChatMessages { flex: 1; overflow-y: auto; display: none; flex-direction: column; gap: 12px; padding: 16px 18px; background: #f8fafc; }
#helpChatMessages::-webkit-scrollbar { width: 4px; }
#helpChatMessages::-webkit-scrollbar-thumb { background: #e2e8f0; border-radius: 4px; }
#panelHelp.hp-in-chat #helpPanelBody { display: none; }
#panelHelp.hp-in-chat #helpChatMessages { display: flex; }

/* ── Browse-all topic list ───────────────────────────────────────────── */
.hp-section-lbl {
  padding: 12px 18px 5px;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8;
}
.hp-topic-row {
  width: 100%; text-align: left; background: none; border: none;
  border-bottom: 1px solid #f8fafc; padding: 10px 18px;
  cursor: pointer; display: flex; align-items: center; gap: 11px;
  transition: background .12s;
}
.hp-topic-row:hover { background: #f8fafc; }
.hp-topic-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.hp-topic-name  { margin: 0; font-size: 13px; font-weight: 600; color: #1e293b; }
.hp-topic-sect  { margin: 0; font-size: 11px; color: #94a3b8; }
.hp-topic-arrow { font-size: 16px; color: #e2e8f0; flex-shrink: 0; margin-left: auto; }

/* ── Topic detail ────────────────────────────────────────────────────── */
.hp-topic-intro {
  padding: 16px 18px 14px; background: #f8fafc;
  border-bottom: 1px solid #f1f5f9;
}
.hp-intro-text {
  margin: 0 0 12px; font-size: 13px; color: #475569; line-height: 1.6;
}
.hp-intro-text:last-child { margin-bottom: 0; }
.hp-goto-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 8px;
  background: #f1f5f9; border: 1.5px solid #e2e8f0; color: #78350f;
  font-size: 12px; font-weight: 700; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.hp-goto-btn:hover { background: #e2e8f0; border-color: #94a3b8; color: #3730a3; }
.hp-goto-btn i { font-size: 13px; }

.hp-steps-lbl {
  padding: 12px 18px 6px;
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8;
}
.hp-step-row {
  display: flex; gap: 12px; padding: 13px 18px;
  border-bottom: 1px solid #f8fafc;
}
.hp-step-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.hp-step-num {
  width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0;
  font-size: 10px; font-weight: 800; color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}
.hp-step-title { margin: 0 0 3px; font-size: 13px; font-weight: 700; color: #1e293b; }
.hp-step-body  { margin: 0; font-size: 12px; color: #64748b; line-height: 1.55; }

.hp-tips-wrap  { padding: 14px 18px 18px; }
.hp-tips-lbl   {
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; color: #94a3b8; margin: 0 0 10px;
}
.hp-tip-row    { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.hp-tip-row:last-child { margin-bottom: 0; }
.hp-tip-row i  { font-size: 14px; color: #f97316; flex-shrink: 0; margin-top: 1px; }
.hp-tip-row p  { margin: 0; font-size: 12px; color: #64748b; line-height: 1.5; }

/* ── Search results ──────────────────────────────────────────────────── */
.hp-sr-row {
  width: 100%; text-align: left; background: none; border: none;
  border-bottom: 1px solid #f8fafc; padding: 12px 18px;
  cursor: pointer; display: flex; align-items: flex-start; gap: 11px;
  transition: background .12s;
}
.hp-sr-row:hover { background: #f8fafc; }
.hp-sr-ico {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0; margin-top: 1px;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.hp-sr-title { margin: 0 0 3px; font-size: 13px; font-weight: 700; color: #1e293b; }
.hp-sr-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em;
  padding: 1px 6px; border-radius: 4px; margin-left: 5px; vertical-align: middle;
}
.hp-sr-preview { margin: 0; font-size: 11px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hp-sr-arrow   { font-size: 16px; color: #e2e8f0; flex-shrink: 0; margin-top: 8px; margin-left: auto; }

/* Empty / no results */
.hp-empty {
  padding: 52px 24px; text-align: center;
}
.hp-empty i    { font-size: 40px; color: #e2e8f0; display: block; margin-bottom: 14px; }
.hp-empty h6   { margin: 0 0 6px; font-size: 14px; font-weight: 700; color: #64748b; }
.hp-empty p    { margin: 0; font-size: 12.5px; color: #94a3b8; }


.hc-msg { display: flex; align-items: flex-end; gap: 8px; }
.hc-msg.hc-user { flex-direction: row-reverse; }
.hc-msg-body { display: flex; flex-direction: column; gap: 6px; max-width: 82%; }
.hc-bubble {
  padding: 9px 13px; border-radius: 14px;
  font-size: 13px; line-height: 1.55; word-break: break-word;
}
.hc-user .hc-bubble { background:#111827; color: #fff; border-bottom-right-radius: 4px; }
.hc-ai   .hc-bubble { background: #fff; color: #1e293b; border-bottom-left-radius: 4px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.hc-avatar {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.hc-ai .hc-avatar   { background: #f1f5f9; color: #78350f; }
.hc-user .hc-avatar { background: #e2e8f0; color: #475569; }
.hc-cta-row { display: flex; flex-wrap: wrap; gap: 6px; }
.hc-cta-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  background: #f1f5f9; border: 1.5px solid #e2e8f0; color: #78350f;
  font-size: 12px; font-weight: 600; text-decoration: none;
  transition: background .15s, border-color .15s;
}
.hc-cta-btn:hover { background: #e2e8f0; border-color: #94a3b8; color: #3730a3; text-decoration: none; }
.hc-cta-btn i { font-size: 13px; }

.hc-typing .hc-bubble { padding: 11px 13px; }
.hc-typing-dots { display: flex; gap: 4px; }
.hc-typing-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: #94a3b8;
  animation: hcDot 1.2s infinite;
}
.hc-typing-dots span:nth-child(2) { animation-delay: .2s; }
.hc-typing-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes hcDot { 0%,60%,100% { transform: translateY(0); } 30% { transform: translateY(-4px); } }
