/* ============================================================
   Help Bot — Glynu App
   Colors match app palette: #183530 cards, #214a44 borders,
   #8eccc3 accent, #22c55e actions, #0f1f1d panel bg
   ============================================================ */

/* ── Floating button ──────────────────────────────────────── */
#help-bot-btn {
  position: fixed;
  bottom: calc(100px + env(safe-area-inset-bottom, 0px));
  right: 16px;
  z-index: 60;
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 50%;
  background: #b0cb1f;
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(0,0,0,0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}
#help-bot-btn svg { stroke: #000; stroke-width: 1.5; paint-order: stroke fill; }
#help-bot-btn:hover  { background: #93a818; transform: scale(1.08); }
#help-bot-btn:focus-visible { outline: 2px solid #8eccc3; outline-offset: 3px; }
#help-bot-btn.hidden { display: none; }

/* ── Slide-in panel ──────────────────────────────────────── */
#help-bot-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 340px;
  z-index: 70;
  background: #0e1c1a;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -6px 0 24px rgba(0,0,0,0.55);
}
#help-bot-panel.open { transform: translateX(0); }

/* ── Header ──────────────────────────────────────────────── */
.help-bot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #183530;
  border-bottom: 1px solid #214a44;
  flex-shrink: 0;
}
.help-bot-header-title {
  color: #8eccc3;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.help-bot-close {
  background: none;
  border: none;
  color: #8eccc3;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.help-bot-close:hover        { background: #214a44; color: #fff; }
.help-bot-close:focus-visible { outline: 2px solid #8eccc3; outline-offset: 2px; }

/* ── Breadcrumb ──────────────────────────────────────────── */
#help-bot-breadcrumb {
  padding: 6px 16px;
  background: #183530;
  border-bottom: 1px solid #1a3530;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  min-height: 36px;
  flex-shrink: 0;
}
#help-bot-breadcrumb:empty { display: none; }
.help-bot-back-btn {
  background: none;
  border: none;
  color: #8eccc3;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  min-height: 28px;
  transition: background 0.15s;
}
.help-bot-back-btn:hover        { background: #214a44; }
.help-bot-back-btn:focus-visible { outline: 2px solid #8eccc3; }
.help-bot-crumb-sep     { color: #3d6e68; font-size: 12px; padding: 0 2px; }
.help-bot-crumb-current { color: #d4ede9; font-size: 12px; }

/* ── Search ──────────────────────────────────────────────── */
.help-bot-search-wrap {
  padding: 12px 16px 8px;
  flex-shrink: 0;
}
.help-bot-search {
  width: 100%;
  padding: 9px 14px;
  background: #214a44;
  border: 1px solid #2d5e57;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#help-bot-panel input.help-bot-search,
#help-bot-panel input.help-bot-search:focus {
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  background: #214a44 !important;
  background-color: #214a44 !important;
  border-color: #2d5e57 !important;
}
#help-bot-panel input.help-bot-search:-webkit-autofill,
#help-bot-panel input.help-bot-search:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #214a44 inset !important;
  -webkit-text-fill-color: #fff !important;
}
.help-bot-search:focus        { border-color: #8eccc3; }
.help-bot-search::placeholder { color: #4d8a83; }

/* ── Scrollable content ──────────────────────────────────── */
.help-bot-content {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-bottom: 16px;
}
.help-bot-content::-webkit-scrollbar       { width: 4px; }
.help-bot-content::-webkit-scrollbar-track { background: transparent; }
.help-bot-content::-webkit-scrollbar-thumb { background: #214a44; border-radius: 2px; }

/* ── Welcome ─────────────────────────────────────────────── */
.help-bot-welcome {
  color: #8eccc3;
  padding: 12px 16px 8px;
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}

/* ── Section & topic buttons ─────────────────────────────── */
.help-bot-section-btn,
.help-bot-topic-btn {
  width: 100%;
  background: none;
  border: none;
  border-bottom: 1px solid #172e2b;
  padding: 13px 16px;
  text-align: left;
  color: #e0f2ef;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  min-height: 48px;
  gap: 8px;
  transition: background 0.15s;
}
.help-bot-section-btn:hover,
.help-bot-topic-btn:hover   { background: #172e2b; }
.help-bot-section-btn:focus-visible,
.help-bot-topic-btn:focus-visible { outline: 2px solid #8eccc3; outline-offset: -2px; }
.help-bot-section-btn svg,
.help-bot-topic-btn   svg   { flex-shrink: 0; color: #4d8a83; }
.help-bot-topic-btn > span  { flex: 1; }

/* ── Topic detail ────────────────────────────────────────── */
.help-bot-topic-title {
  color: #8eccc3;
  font-size: 14px;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid #214a44;
  margin: 0;
  line-height: 1.4;
}

/* ── Steps list ──────────────────────────────────────────── */
.help-bot-steps {
  list-style: none;
  padding: 4px 16px 8px;
  margin: 0;
}
.help-bot-steps li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #172e2b;
  color: #c9e8e3;
  font-size: 13px;
  line-height: 1.55;
  align-items: flex-start;
}
.help-bot-steps li:last-child { border-bottom: none; }
.help-bot-steps strong        { color: #fff; font-weight: 600; }
.help-bot-step-num {
  background: #b0cb1f;
  color: #102320;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  margin-top: 2px;
}

/* ── Info text ───────────────────────────────────────────── */
.help-bot-info-text {
  color: #c9e8e3;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
}
.help-bot-info-text strong { color: #fff; font-weight: 600; }

/* ── Search result section label ─────────────────────────── */
.help-bot-result-section {
  color: #8eccc3;
  font-size: 11px;
  display: block;
  margin-bottom: 1px;
}

/* ── No results ──────────────────────────────────────────── */
.help-bot-no-results {
  color: #4d8a83;
  padding: 20px 16px;
  font-size: 14px;
  text-align: center;
  margin: 0;
}

/* ── Header button group ─────────────────────────────────── */
.help-bot-header-btns {
  display: flex;
  align-items: center;
  gap: 2px;
}
.help-bot-minimize {
  background: none;
  border: none;
  color: #8eccc3;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  min-width: 40px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.help-bot-minimize:hover        { background: #214a44; color: #fff; }
.help-bot-minimize:focus-visible { outline: 2px solid #8eccc3; outline-offset: 2px; }

/* ── Minimized tab ───────────────────────────────────────── */
#help-bot-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 70;
  background: #b0cb1f;
  color: #102320;
  border: none;
  border-radius: 8px 0 0 8px;
  padding: 14px 8px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: -3px 0 14px rgba(0,0,0,0.45);
  transition: padding-left 0.2s ease;
}
#help-bot-tab.visible           { display: flex; }
#help-bot-tab:hover             { padding-left: 12px; }
#help-bot-tab:focus-visible     { outline: 2px solid #8eccc3; outline-offset: 2px; }
#help-bot-tab-label {
  font-size: 10px;
  font-weight: 700;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  letter-spacing: 0.06em;
  font-family: inherit;
}

/* ── Reduced motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  #help-bot-panel { transition: none; }
  #help-bot-btn   { transition: none; }
  #help-bot-tab   { transition: none; }
}
