/* Ayudante de la tienda (tarea 0882) — cajón de shop/js/help-manual.js. */
:root {
  --hm-coral: #ff6f61;
  --hm-coral-soft: #fff1ef;
  --hm-text: #333;
  --hm-muted: #7a7a7a;
  --hm-line: #ece7e2;
  --hm-bg: #fff;
  --hm-w: 390px;
}

/* Botón «?» de la barra */
.nav-help-btn {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--hm-coral);
  background: #fff; color: var(--hm-coral); display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; margin-right: 10px; padding: 0; transition: background .15s, color .15s;
}
.nav-help-btn:hover, .nav-help-btn.active { background: var(--hm-coral); color: #fff; }

.hm-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: var(--hm-w); max-width: 100vw; z-index: 1045;
  background: var(--hm-bg); color: var(--hm-text); box-shadow: -8px 0 28px rgba(0,0,0,.12);
  display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease;
  font-size: 14px; line-height: 1.45;
}
body.hm-on .hm-drawer { transform: none; }

.hm-head { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--hm-line); }
.hm-head-ico { width: 30px; height: 30px; border-radius: 50%; background: var(--hm-coral); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none; }
.hm-head-txt { flex: 1; min-width: 0; }
.hm-head-txt h2 { font-size: 16px; margin: 0; font-weight: 600; color: var(--hm-text); }
.hm-head-txt span { font-size: 12px; color: var(--hm-muted); }
.hm-close { border: 0; background: none; font-size: 16px; color: var(--hm-muted); cursor: pointer; padding: 6px; }

.hm-search { position: relative; display: flex; align-items: center; margin: 12px 16px; border: 1.5px solid var(--hm-line);
  border-radius: 10px; padding: 0 10px; }
.hm-search:focus-within { border-color: var(--hm-coral); }
.hm-search svg { width: 16px; height: 16px; color: var(--hm-muted); flex: none; }
.hm-search input { flex: 1; border: 0; outline: 0; padding: 10px 8px; font-size: 15px; background: transparent; min-width: 0; }
.hm-search input::-webkit-search-cancel-button { display: none; }
.hm-clear { display: none; border: 0; background: none; color: var(--hm-muted); cursor: pointer; padding: 4px; }

.hm-body { flex: 1; overflow-y: auto; padding: 0 16px 16px; overscroll-behavior: contain; }

.hm-list-head { font-weight: 600; margin: 4px 0 8px; }
.hm-list-head span { display: block; font-weight: 400; font-size: 12.5px; color: var(--hm-muted); }
.hm-group { color: var(--hm-coral); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 14px 0 6px; }
.hm-list-foot { text-align: center; margin-top: 12px; }

.hm-topic { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--hm-line); border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.hm-topic:hover, .hm-topic:focus { border-color: var(--hm-coral); background: var(--hm-coral-soft); outline: 0; }
.hm-ico { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; flex: none; }
.hm-topic-txt { flex: 1; min-width: 0; }
.hm-topic h4 { font-size: 14px; margin: 0; font-weight: 600; color: var(--hm-text); }
.hm-topic p { font-size: 12.5px; color: var(--hm-muted); margin: 2px 0 0; }
.hm-page { display: inline-block; margin-top: 5px; font-size: 11.5px; color: var(--hm-coral); }
.hm-arrow svg { width: 16px; height: 16px; color: var(--hm-muted); margin-top: 8px; }

.hm-empty { text-align: center; color: var(--hm-muted); padding: 28px 8px; }
.hm-empty svg { width: 40px; height: 40px; display: block; margin: 0 auto 10px; color: var(--hm-line); }

.hm-back { border: 0; background: none; color: var(--hm-coral); cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 0; font-size: 13px; }
.hm-back svg { width: 16px; height: 16px; }
.hm-detail h3 { display: flex; gap: 10px; align-items: center; font-size: 17px; font-weight: 600; margin: 8px 0 6px; color: var(--hm-text); }
.hm-sum { color: var(--hm-muted); margin-bottom: 12px; }
.hm-actions { margin-bottom: 14px; }
.hm-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--hm-coral); color: #fff !important; border-radius: 8px;
  padding: 8px 14px; font-weight: 600; text-decoration: none !important; }
.hm-btn svg, .hm-step-link svg, .hm-foot-wa svg { width: 15px; height: 15px; flex: none; }
.hm-btn-sec { border: 1.5px solid var(--hm-coral); color: var(--hm-coral); background: #fff; border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.hm-step { display: flex; gap: 10px; margin-bottom: 10px; }
.hm-step-n { width: 24px; height: 24px; border-radius: 50%; background: var(--hm-coral); color: #fff; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex: none; margin-top: 1px; }
.hm-step-c { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.hm-step-link { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--hm-coral) !important; font-weight: 600; }

.hm-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 16px;
  border-top: 1px solid var(--hm-line); font-size: 11.5px; color: var(--hm-muted); }
.hm-foot-wa { display: inline-flex; align-items: center; gap: 6px; color: #1fa855 !important; font-weight: 600; font-size: 13px; }
.hm-wa-link svg { color: #1fa855; }
.hm-btn.hm-wa-link { background: #1fa855; }
.hm-btn.hm-wa-link svg { color: #fff; }

/* Halo: el elemento al que lleva un enlace con ?focus= late 5 s. */
.help-focus-target { animation: hm-halo 1.2s ease-in-out 4; outline: 3px solid var(--hm-coral); outline-offset: 3px; border-radius: 6px; }
@keyframes hm-halo { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,111,97,.55); } 50% { box-shadow: 0 0 0 10px rgba(255,111,97,0); } }

@media (max-width: 640px) {
  .hm-drawer { width: 100vw; }
}

/* ─── Guía paso a paso (help-manual.js · gMostrar) ───
   Anillo y globo `position:fixed`, recolocados en cada fotograma sobre el
   elemento. No captan el puntero: el toque tiene que llegar al elemento.
   z-index por encima de los modales de Bootstrap (1050) y de select2 (1051). */
.hm-btn-guia { border: 0; cursor: pointer; font-size: 14px; }
.hm-btn-guia svg { width: 17px; height: 17px; }
.hm-guide-note { font-size: 12px; color: var(--hm-muted); margin-top: 6px; }
.hm-btn-link { display: inline-flex; align-items: center; gap: 6px; text-decoration: none !important; color: var(--hm-coral) !important; font-weight: 600; }
.hm-btn-link svg { width: 15px; height: 15px; }

.hg-anillo { position: fixed; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 2000;
  border: 3px solid var(--hm-coral); border-radius: 12px; box-shadow: 0 0 0 1px rgba(255,255,255,.7);
  opacity: 0; transition: opacity .25s ease; }
.hg-anillo.is-on { opacity: 1; }
.hg-onda { position: absolute; inset: -3px; border: 3px solid var(--hm-coral); border-radius: inherit; opacity: 0;
  animation: hgOnda 1.25s ease-out infinite; }
.hg-onda + .hg-onda { animation-delay: .62s; }
@keyframes hgOnda { 0% { opacity: .75; inset: -3px; } 100% { opacity: 0; inset: -19px; } }

.hg-globo { position: fixed; left: 0; top: 0; max-width: 270px; pointer-events: none; z-index: 2001;
  background: #2b2b2b; color: #fff; border: 1.5px solid var(--hm-coral); border-radius: 10px;
  padding: 8px 11px; font-size: 13px; line-height: 1.4; font-weight: 500; box-shadow: 0 10px 28px rgba(0,0,0,.25);
  opacity: 0; transform: translateY(4px); transition: opacity .25s ease, transform .25s ease; }
.hg-globo.is-on { opacity: 1; transform: none; }

.hg-barra { position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 140%); z-index: 2002;
  display: flex; align-items: center; gap: 12px; width: min(560px, calc(100vw - 24px));
  background: #fff; border: 1.5px solid var(--hm-coral); border-radius: 12px; padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); font-size: 13px; color: var(--hm-text);
  transition: transform .25s ease, top .2s ease, bottom .2s ease; }
.hg-barra.is-on { transform: translate(-50%, 0); }
.hg-barra.is-arriba { bottom: auto; top: 12px; }
.hg-barra.is-arriba:not(.is-on) { transform: translate(-50%, -140%); }
.hg-barra-txt { flex: 1; min-width: 0; }
.hg-n { color: var(--hm-coral); display: block; font-size: 12px; }
.hg-barra-btns { display: flex; align-items: center; gap: 4px; flex: none; }
.hg-volver { border: 1.5px solid var(--hm-coral); color: var(--hm-coral); background: #fff; border-radius: 8px;
  padding: 5px 10px; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.hg-salir { border: 0; background: none; color: var(--hm-muted); font-size: 15px; cursor: pointer; padding: 6px; }

@media (max-width: 640px) {
  .hg-barra { bottom: 10px; gap: 8px; padding: 8px 10px; font-size: 12.5px; }
  .hg-barra.is-arriba { top: 8px; }
  .hg-volver { padding: 5px 8px; font-size: 12px; }
  /* En el teléfono la barra ya dice el paso: el globo solo tapaba (el total del carrito). */
  .hg-globo { display: none; }
}
