/* help.css — Modal de Ajuda (HelpModal)
 * Visual consistente com support.css mas sem partilha de classes — namespace .sp-help-*
 */

.sp-help-wrap {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}
.sp-help-wrap.is-open {
  display: flex;
  pointer-events: auto;
  animation: sp-help-fade .18s ease-out;
}
@keyframes sp-help-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

body.sp-help-locked { overflow: hidden; }

.sp-help-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.sp-help-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 88vh;
  background: linear-gradient(180deg, #14182a 0%, #0a0d18 100%);
  border: 1px solid rgba(167, 139, 250, .25);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ── HEADER ─────────────────────────────────────────────────────── */
.sp-help-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  gap: 12px;
}
.sp-help-head-text { min-width: 0; }
.sp-help-eyebrow {
  font-family: 'Roboto Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.5px;
  color: rgba(167, 139, 250, .8);
  font-weight: 700;
}
.sp-help-eyebrow span { color: #fff; }
.sp-help-title {
  font-family: 'Inter', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #f1f5f9;
  margin-top: 4px;
}
.sp-help-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .65);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
  flex: 0 0 auto;
  transition: all .15s ease;
}
.sp-help-close:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

/* ── TABS ───────────────────────────────────────────────────────── */
.sp-help-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 8px 12px;
  background: rgba(0, 0, 0, .25);
  border-bottom: 1px solid rgba(255, 255, 255, .04);
}
.sp-help-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255, 255, 255, .55);
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  transition: all .15s ease;
}
.sp-help-tab-icon { font-size: 18px; line-height: 1; }
.sp-help-tab-label { letter-spacing: .2px; }
.sp-help-tab:hover {
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .85);
}
.sp-help-tab.is-active {
  background: rgba(167, 139, 250, .12);
  border-color: rgba(167, 139, 250, .4);
  color: #fff;
}

/* ── BODY ───────────────────────────────────────────────────────── */
.sp-help-body {
  padding: 18px 20px;
  overflow-y: auto;
  flex: 1;
  color: rgba(241, 245, 249, .92);
  font-size: 13.5px;
  line-height: 1.55;
}
.sp-help-body b { color: #fff; font-weight: 700; }
.sp-help-body i { color: rgba(255, 255, 255, .7); font-style: italic; }
.sp-help-body a {
  color: #cbb8ff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(203, 184, 255, .35);
}

.sp-help-lead {
  font-size: 13.5px;
  color: rgba(241, 245, 249, .88);
  margin: 0 0 14px;
  line-height: 1.55;
}

/* Steps numerados (1, 2, 3...) */
.sp-help-step {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
}
.sp-help-step:first-of-type { border-top: 0; padding-top: 6px; }
.sp-help-step-num {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(167,139,250,.25), rgba(139,92,246,.18));
  border: 1px solid rgba(167, 139, 250, .35);
  color: #cbb8ff;
  font-family: 'Roboto Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sp-help-step-body {
  flex: 1;
  font-size: 13px;
  color: rgba(241, 245, 249, .88);
}

/* Inline icon hint (ex: ⎙) */
.sp-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 5px;
  font-size: 13px;
  vertical-align: middle;
  margin: 0 2px;
}

/* Cards tier (sinais) */
.sp-help-tier {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(255, 255, 255, .06);
}
.sp-help-tier-badge {
  flex: 0 0 96px;
  font-family: 'Roboto Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  padding: 4px 8px;
  border-radius: 6px;
  text-align: center;
  white-space: nowrap;
}
.sp-help-tier-body {
  flex: 1;
  font-size: 12.5px;
  color: rgba(241, 245, 249, .85);
  line-height: 1.5;
}
.sp-help-tier-strong   { border-color: rgba(34, 197, 94, .35); }
.sp-help-tier-strong   .sp-help-tier-badge { background: rgba(34, 197, 94, .18); color: #4ade80; }
.sp-help-tier-positive { border-color: rgba(34, 197, 94, .22); }
.sp-help-tier-positive .sp-help-tier-badge { background: rgba(34, 197, 94, .10); color: #86efac; }
.sp-help-tier-mixed    { border-color: rgba(234, 179, 8, .30); }
.sp-help-tier-mixed    .sp-help-tier-badge { background: rgba(234, 179, 8, .15); color: #fde047; }
.sp-help-tier-caution  { border-color: rgba(234, 179, 8, .20); }
.sp-help-tier-caution  .sp-help-tier-badge { background: rgba(234, 179, 8, .10); color: #facc15; }
.sp-help-tier-warn     { border-color: rgba(239, 68, 68, .35); }
.sp-help-tier-warn     .sp-help-tier-badge { background: rgba(239, 68, 68, .18); color: #f87171; }

/* Caixa de dica */
.sp-help-tip {
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(167, 139, 250, .08);
  border: 1px solid rgba(167, 139, 250, .22);
  border-radius: 10px;
  font-size: 12.5px;
  color: rgba(241, 245, 249, .85);
  line-height: 1.5;
}

/* ── FOOTER ─────────────────────────────────────────────────────── */
.sp-help-foot {
  padding: 10px 20px;
  font-family: 'Roboto Mono', monospace;
  font-size: 10.5px;
  color: rgba(255, 255, 255, .45);
  border-top: 1px solid rgba(255, 255, 255, .05);
  text-align: center;
}

/* ── HELP TRIGGER BUTTON (topbar) ───────────────────────────────── */
.sp-help-trigger {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .65);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 800;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all .15s ease;
  flex: 0 0 auto;
}
.sp-help-trigger:hover {
  background: rgba(167, 139, 250, .12);
  border-color: rgba(167, 139, 250, .4);
  color: #fff;
}

/* Variante desktop — colocado no status-strip */
.status-strip .sp-help-trigger {
  width: 22px;
  height: 22px;
  font-size: 11px;
  margin-left: 8px;
}

/* ── MOBILE (≤720px) ────────────────────────────────────────────── */
@media (max-width: 720px) {
  .sp-help-card {
    max-height: 92vh;
    max-width: 100%;
    border-radius: 14px;
  }
  .sp-help-head { padding: 14px 16px 12px; }
  .sp-help-title { font-size: 16px; }
  .sp-help-tabs {
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px;
    gap: 2px;
  }
  .sp-help-tab { padding: 6px 2px; font-size: 10px; }
  .sp-help-tab-icon { font-size: 16px; }
  .sp-help-body { padding: 14px 16px; font-size: 13px; }
  .sp-help-tier { flex-direction: column; gap: 6px; padding: 10px; }
  .sp-help-tier-badge { flex: 0 0 auto; align-self: flex-start; }
  .sp-help-foot { padding: 8px 16px; font-size: 10px; }
}
