/* Tutorial guiado — compartido por kiosco, caja, admin y panel.
   Se adapta al aparato: en tablet y celular todo es más grande porque se
   toca con el dedo; en computadora cabe más texto por línea. */

.tour {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;   /* el hueco iluminado SÍ se puede tocar */
}

/* Cuatro paneles alrededor del elemento: dejan un hueco real, no un agujero
   pintado. Así el usuario puede practicar sobre el botón mientras lee. */
.tour-sombra {
  position: fixed;
  background: rgba(6, 10, 22, 0.76);
  pointer-events: auto;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-halo {
  position: fixed;
  border: 2px solid #c8952a;
  border-radius: 12px;
  box-shadow: 0 0 0 3px rgba(200, 149, 42, 0.25);
  pointer-events: none;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.tour-globo {
  position: fixed;
  background: #161d2f;
  border: 1px solid #2a3450;
  border-radius: 16px;
  padding: 18px 20px 16px;
  color: #e9edf6;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
  z-index: 2;
  animation: tour-entra 0.24s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.tour-globo.centrado {
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 32px));
}
@keyframes tour-entra {
  from { opacity: 0; transform: translateY(6px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.tour-globo.centrado { animation: none; }

.tour-flecha {
  position: absolute;
  width: 14px; height: 14px;
  background: #161d2f;
  border: 1px solid #2a3450;
  transform: rotate(45deg);
}
.tour-flecha.arriba { top: -8px; border-right: 0; border-bottom: 0; }
.tour-flecha.abajo { bottom: -8px; border-left: 0; border-top: 0; }

.tour-paso {
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: #c8952a;
  font-weight: 700;
  margin-bottom: 5px;
}
.tour-titulo {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 7px;
  line-height: 1.3;
}
.tour-texto {
  font-size: 14.5px;
  line-height: 1.6;
  color: #c3cadb;
  margin-bottom: 15px;
}

.tour-barra {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.tour-puntos { display: flex; gap: 5px; }
.tour-puntos i {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3a4665;
  transition: background 0.2s, width 0.2s;
}
.tour-puntos i.on { background: #c8952a; width: 18px; border-radius: 3px; }

.tour-saltar {
  margin-left: auto;
  background: none;
  border: 0;
  color: #8b93a7;
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 4px;
  min-height: 36px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.tour-saltar:hover { color: #e9edf6; }

.tour-acciones { display: flex; gap: 9px; }
.tour-btn {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  min-height: 46px;
  transition: filter 0.15s, transform 0.12s;
}
.tour-btn:active { transform: scale(0.97); }
.tour-btn.primary { background: #2f6df6; color: #fff; }
.tour-btn.primary:hover { filter: brightness(1.12); }
.tour-btn.ghost {
  background: transparent;
  border-color: #2a3450;
  color: #b9c1d4;
}
.tour-btn.ghost:hover { background: #1b2338; color: #fff; }

/* Botón para volver a abrir la guía cuando ya se saltó */
.tour-abrir {
  background: transparent;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: inherit;
  opacity: 0.75;
  font-family: inherit;
  font-size: 13px;
  padding: 7px 14px;
  min-height: 38px;
  cursor: pointer;
  transition: opacity 0.15s;
}
.tour-abrir:hover { opacity: 1; }

/* En pantalla táctil el dedo necesita más superficie y el texto más cuerpo */
@media (pointer: coarse) {
  .tour-globo { padding: 20px 22px 18px; }
  .tour-titulo { font-size: 19px; }
  .tour-texto { font-size: 16px; }
  .tour-btn { min-height: 54px; font-size: 15.5px; }
  .tour-saltar { font-size: 14.5px; min-height: 44px; }
}

/* Celular de pie: el globo se va al fondo y ocupa el ancho, como una hoja */
@media (max-width: 500px) {
  .tour-globo,
  .tour-globo.centrado {
    left: 12px !important;
    right: 12px;
    top: auto !important;
    bottom: 14px;
    width: auto !important;
    transform: none;
    max-height: 62vh;
    overflow-y: auto;
  }
  .tour-flecha { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .tour-sombra, .tour-halo, .tour-globo { transition: none; animation: none; }
}
