/* ═══════════════════════════════════════════════════════════════
   HELP SYSTEM — Modal + Strategy Card "How to Use" button
   Rob E Bank AI · v20260504-help
   UI-ONLY — no trading logic, no API, no auth changes
════════════════════════════════════════════════════════════════ */

/* ── "How to Use" pill on strategy launcher cards ─────────────────── */
.btn-how-to-use {
  flex-shrink: 0;
  padding: 3px 10px;
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: rgba(168, 85, 247, 0.88);
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.26);
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, color 0.18s, border-color 0.18s;
  white-space: nowrap;
  line-height: 1.7;
  margin: 0 8px;
  pointer-events: auto;
}
.btn-how-to-use:hover {
  background: rgba(168, 85, 247, 0.16);
  color: rgba(210, 140, 255, 1);
  border-color: rgba(168, 85, 247, 0.46);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.22);
}
/* Pill is dimmed when row is locked (not connected) */
.strategy-row:not(.unlocked) .btn-how-to-use {
  opacity: 0.42;
  pointer-events: none;
}
/* When row is unlocked, always allow click */
.strategy-row.unlocked .btn-how-to-use {
  pointer-events: auto;
  opacity: 1;
}

/* ── Help Modal — Overlay ─────────────────────────────────────────── */
#help-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: rgba(4, 5, 8, 0.84);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  align-items: center;
  justify-content: center;
  padding: 20px 16px;
}
#help-modal.open {
  display: flex;
}

/* ── Help Modal — Glass Card ─────────────────────────────────────── */
.help-modal-card {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  background: linear-gradient(158deg, #0e0b18 0%, #07050e 100%);
  border: 1px solid rgba(190, 138, 42, 0.28);
  border-radius: 14px;
  box-shadow:
    0 0 0 1px rgba(190, 138, 42, 0.07),
    0 0 30px rgba(190, 138, 42, 0.09),
    0 8px 48px rgba(0, 0, 0, 0.76),
    inset 0 1px 0 rgba(255, 224, 130, 0.055);
  padding: 24px 24px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(190, 138, 42, 0.22) transparent;
}
.help-modal-card::-webkit-scrollbar { width: 4px; }
.help-modal-card::-webkit-scrollbar-thumb {
  background: rgba(190, 138, 42, 0.22);
  border-radius: 2px;
}

/* ── Close button ────────────────────────────────────────────────── */
.help-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  color: rgba(175, 195, 240, 0.55);
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
  flex-shrink: 0;
}
.help-modal-close:hover {
  background: rgba(190, 138, 42, 0.11);
  color: #eaaa36;
  border-color: rgba(190, 138, 42, 0.28);
}

/* ── Modal Header ────────────────────────────────────────────────── */
.help-modal-tag {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: rgba(168, 85, 247, 0.80);
  background: rgba(168, 85, 247, 0.10);
  border: 1px solid rgba(168, 85, 247, 0.22);
  border-radius: 20px;
  padding: 2px 9px;
  margin-bottom: 8px;
}
.help-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #eaaa36;
  text-shadow: 0 0 18px rgba(210, 152, 48, 0.32);
  margin-bottom: 3px;
  line-height: 1.3;
  padding-right: 36px;
}
.help-modal-subtitle {
  font-size: 10.5px;
  color: rgba(175, 195, 240, 0.44);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ── Section blocks ──────────────────────────────────────────────── */
.help-section {
  margin-bottom: 13px;
}
.help-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(168, 85, 247, 0.82);
  margin-bottom: 5px;
}
.help-section-body {
  font-size: 12px;
  line-height: 1.68;
  color: rgba(210, 225, 255, 0.76);
}
.help-section-body strong {
  color: rgba(234, 170, 54, 0.95);
  font-weight: 600;
}

/* ── Divider ─────────────────────────────────────────────────────── */
.help-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 138, 42, 0.16), transparent);
  margin: 14px 0;
}

/* ── Step list (ordered) ─────────────────────────────────────────── */
.help-steps {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
  line-height: 1.7;
  color: rgba(210, 225, 255, 0.76);
}
.help-steps li { margin-bottom: 3px; }
.help-steps strong {
  color: rgba(234, 170, 54, 0.92);
  font-weight: 600;
}

/* ── Risk notice ─────────────────────────────────────────────────── */
.help-risk-notice {
  background: rgba(220, 38, 38, 0.07);
  border: 1px solid rgba(220, 38, 38, 0.18);
  border-radius: 8px;
  padding: 10px 13px;
  font-size: 11px;
  color: rgba(252, 165, 165, 0.84);
  line-height: 1.58;
  margin-top: 16px;
}
.help-risk-notice strong {
  color: rgba(252, 165, 165, 1);
  font-weight: 700;
}

/* ── Mobile ──────────────────────────────────────────────────────── */
@media (max-width: 520px) {
  .help-modal-card {
    padding: 18px 15px 16px;
    border-radius: 10px;
    max-height: 90vh;
  }
  .help-modal-title { font-size: 15px; }
  .btn-how-to-use   { font-size: 9px; padding: 2px 7px; margin: 0 5px; }
}
