/* ==========================================================================
   38 · «¿CÓMO SE HACE?» — el botón y el recorrido  (5 de octubre de 2026)
   ==========================================================================
   El botón va sobrio —borde fino y el play en amarillo— desde el 16 de
   octubre de 2026: el amarillo lleno con su brillo y su anillo que latía se
   veía poco profesional. Va UNA vez y en el mismo sitio en todas las
   pestañas: la barra oscura de arriba. El Cierre de caja tenía otro en su
   guía y se quitó (5 de octubre de 2026): dos botones que hacen lo mismo
   hacen dudar. Mientras ese perfil no haya visto el recorrido de esa pestaña,
   lleva un punto amarillo quieto en la esquina (`.como--nuevo`). El recorrido —foco y
   globo— es el mismo para todas: js/28-como-se-hace.js. */

.como {
  position: relative; flex: none;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .38rem .85rem .38rem .7rem; border-radius: 99px;
  background: transparent; border: 1px solid rgba(253,244,231,.2); color: var(--crema);
  font: 500 .82rem/1.1 var(--sans); letter-spacing: .005em; white-space: nowrap;
  transition: background var(--d-rapido) var(--ease), border-color var(--d-rapido) var(--ease);
}
.como:hover { background: rgba(253,244,231,.07); border-color: rgba(253,244,231,.34); }
.como:active { background: rgba(253,244,231,.11); }
.como:focus-visible { outline: 2px solid var(--crema); outline-offset: 3px; }
.como__i { display: grid; place-items: center; color: var(--amarillo); }
.como__i .ico { font-size: .72rem; translate: 1px 0; }

/* Nunca visto: un punto amarillo quieto en la esquina, como un aviso sin leer. */
.como--nuevo::after {
  content: ''; position: absolute; top: -2px; right: -2px; width: .5rem; height: .5rem;
  border-radius: 99px; background: var(--amarillo); box-shadow: 0 0 0 2px var(--nori);
  pointer-events: none;
}

/* En el celular, solo el círculo con el play: el rótulo no cabe en la barra. */
@media (max-width: 720px) {
  .barra .como { padding: .5rem; }
  .barra .como__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .barra .como__i .ico { font-size: .8rem; }
}

/* --- El recorrido: un foco y un globo ------------------------------------ */
.tour { position: fixed; inset: 0; z-index: 900; }
.tour__foco {
  position: fixed; border-radius: 22px; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(22,16,13,.62), 0 0 0 3px var(--amarillo);
  transition: top .35s var(--ease), left .35s var(--ease), width .35s var(--ease), height .35s var(--ease);
}
.tour--centro .tour__foco { box-shadow: 0 0 0 9999px rgba(22,16,13,.62); }
.tour__globo {
  position: fixed; width: min(27rem, calc(100vw - 32px)); padding: 1.1rem 1.2rem 1rem;
  border-radius: 18px; background: var(--surface); color: var(--tinta);
  border-top: 4px solid var(--amarillo);
  box-shadow: 0 24px 60px rgba(0,0,0,.3); outline: none;
  transition: top .35s var(--ease), left .35s var(--ease);
  animation: tbl-aparece .3s var(--ease) both;
}
.tour--centro .tour__globo { top: 50% !important; left: 50% !important; transform: translate(-50%, -50%); }
.tour__cab { display: flex; align-items: center; gap: .7rem; }
.tour__n { flex: none; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--rojo); }
.tour__barra { flex: 1; height: 4px; border-radius: 99px; background: var(--crema-2); overflow: hidden; }
.tour__barra i { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--naranja);
  transition: width .35s var(--ease); }
.tour__globo h3 { margin: .45rem 0 .45rem; font-family: var(--display); font-size: 1.25rem; }
.tour__globo p { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--tinta-2); }
.tour__acc { display: flex; align-items: center; gap: .4rem; margin-top: 1rem; }
.tour__acc > span { flex: 1; }
@media (prefers-reduced-motion: reduce) {
  .tour__foco, .tour__globo, .tour__barra i { transition: none; }
}

/* --- En la cabecera de una ventana ----------------------------------------
   Las que se abren encima (Sonido y avisos, El panel en tu celular, Cambiar
   mi contraseña, la ficha del cliente) tapan la barra de arriba: llevan su
   propio botón, un poco más pequeño, a la derecha de la cabecera. En un cajón
   va arriba, al lado de la equis. */
.como--dlg { font-size: .78rem; padding: .3rem .75rem .3rem .62rem; gap: .42rem;
  border-color: rgba(255,255,255,.3); }
.como--dlg:focus-visible { outline-color: #fff; }
.modal__cab .como--dlg { margin-left: auto; align-self: center; }
.cajon__cab .como--dlg { position: absolute; top: .85rem; right: 3.4rem; z-index: 3; }
/* El título no se mete debajo del botón (la ficha del cliente tiene su portada). */
.cajon__cab:has(.como--dlg) > div:not(.cajon__icono):not(.exp-cab) { padding-right: 9.5rem; }
@media (max-width: 720px) {
  .como--dlg { padding: .45rem; }
  .como--dlg .como__t { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  /* Aquí el cajón no lleva equis (se cierra con el asa): el botón va a la esquina. */
  .cajon__cab .como--dlg { right: .85rem; }
  .cajon__cab:has(.como--dlg) > div:not(.cajon__icono):not(.exp-cab) { padding-right: 1.6rem; }
  .cajon__cab:has(.como--dlg) .exp-id__k { padding-right: 2.6rem; }
}
