/* ==========================================================================
   Tour de ayuda de Mentaris (ver wwwroot/js/mentaris-tour.js).
   Sin transiciones ni animaciones a propósito: la burbuja se crea de nuevo en cada
   paso y aparece de golpe, que es lo que evita el bug de repintado de iOS Safari.
   Texto de la burbuja: navy sobre blanco (≈13:1); botón principal navy con texto blanco.
   ========================================================================== */

:root {
    --mt-ink: #102C57;
    --mt-ink-hover: #1d4175;
    --mt-teal: #14788a;
    --mt-body: #3d4a5e;
    --mt-z: 2000;
}

.mt-capa {
    position: fixed;
    inset: 0;
    z-index: var(--mt-z);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* El "foco" es un recuadro transparente cuya sombra enorme oscurece todo lo demás */
.mt-foco {
    position: fixed;
    box-sizing: border-box;
    border-radius: 10px;
    box-shadow: 0 0 0 2px #23A3B7, 0 0 0 9999px rgba(4, 9, 26, .62);
    pointer-events: none;
}
.mt-foco-ninguno { border-radius: 0; box-shadow: 0 0 0 9999px rgba(4, 9, 26, .62); }

.mt-tip {
    position: fixed;
    box-sizing: border-box;
    background: #fff;
    color: var(--mt-body);
    border-radius: 16px;
    padding: 16px 18px 14px;
    box-shadow: 0 14px 44px rgba(4, 9, 26, .45);
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 1;
}

/* En el celular: hoja fija abajo, por encima de la barra del iPhone */
.mt-tip-hoja {
    bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
    top: auto !important;
}

.mt-cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.mt-titulo { font-size: 1.0625rem; font-weight: 800; color: var(--mt-ink); margin: 2px 0 0; line-height: 1.3; letter-spacing: -0.01em; }
.mt-cerrar {
    flex-shrink: 0; width: 44px; height: 44px; margin: -8px -10px 0 0;
    border: 0; background: transparent; color: #566377; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center; font-size: 1rem;
}
.mt-cerrar:hover { background: #eef1f6; color: var(--mt-ink); }

.mt-cuerpo { font-size: .9375rem; line-height: 1.55; margin-bottom: 14px; }

.mt-pie { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-progreso { display: flex; flex-direction: column; gap: 6px; }
.mt-paso { font-size: .8125rem; color: #566377; }
.mt-puntos { display: inline-flex; gap: 5px; }
.mt-puntos i { width: 7px; height: 7px; border-radius: 50%; background: #cfd8e3; display: block; }
.mt-puntos i.activo { background: var(--mt-teal); }

.mt-botones { display: flex; gap: 8px; margin-left: auto; }
.mt-btn {
    min-height: 44px; padding: 0 18px; border-radius: 12px; font-weight: 700; font-size: .9375rem;
    border: 1px solid transparent; cursor: pointer;
}
.mt-btn-pri { background: var(--mt-ink); color: #fff; }
.mt-btn-pri:hover { background: var(--mt-ink-hover); }
.mt-btn-sec { background: #fff; color: var(--mt-ink); border-color: #c9d2df; }
.mt-btn-sec:hover { background: #f1f4f9; }
.mt-btn:focus-visible, .mt-cerrar:focus-visible { outline: 3px solid rgba(20, 120, 138, .55); outline-offset: 2px; }

/* ---------- Botón flotante de ayuda (los 7 botones comparten estas reglas) ----------
   Botón con TEXTO: un círculo con "?" no se reconocía como ayuda y casi nadie lo tocaba.
   Fondo navy con texto blanco (13:1) en vez del teal de marca (blanco sobre #23A3B7 = 2.9:1). */
.mt-fab {
    bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
    right: calc(20px + env(safe-area-inset-right, 0px)) !important;
    width: auto !important;
    height: 52px !important;
    padding: 0 20px 0 16px !important;
    border-radius: 999px !important;
    gap: 8px;
    background: var(--mt-ink) !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}
.mt-fab .bi { font-size: 1.2rem; }
.mt-fab-txt { font-size: .9375rem; font-weight: 700; letter-spacing: .01em; }
.mt-fab:hover { background: var(--mt-ink-hover) !important; }
.mt-fab:focus-visible { outline: 3px solid rgba(20, 120, 138, .55); outline-offset: 3px; }
.mt-fab:active { transform: scale(.96); }

/* Se anima con un anillo (3 veces) solo mientras el aviso de primera visita está a la vista */
@keyframes mtPulso { 0% { box-shadow: 0 0 0 0 rgba(35, 163, 183, .6); } 100% { box-shadow: 0 0 0 16px rgba(35, 163, 183, 0); } }
.mt-fab.mt-llamar { animation: mtPulso 1.4s ease-out 3; }

/* Aviso de primera visita, encima del botón */
.mt-aviso {
    position: fixed;
    z-index: 1049;
    right: calc(20px + env(safe-area-inset-right, 0px));
    bottom: calc(24px + 52px + 14px + env(safe-area-inset-bottom, 0px));
    max-width: min(300px, calc(100vw - 32px));
    background: #fff;
    color: var(--mt-body);
    border-radius: 14px;
    padding: 12px 40px 12px 14px;
    box-shadow: 0 10px 32px rgba(4, 9, 26, .28);
    font-size: .875rem;
    line-height: 1.45;
    cursor: pointer;
}
.mt-aviso::after {
    content: ""; position: absolute; right: 34px; bottom: -7px; width: 14px; height: 14px;
    background: #fff; transform: rotate(45deg); border-radius: 3px;
}
.mt-aviso strong { display: block; color: var(--mt-ink); font-size: .9375rem; margin-bottom: 2px; }
.mt-aviso-x {
    position: absolute; top: 2px; right: 2px; width: 40px; height: 40px; border: 0; background: transparent;
    color: #566377; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
}
.mt-aviso-x:hover { background: #eef1f6; color: var(--mt-ink); }
.mt-aviso-x:focus-visible { outline: 3px solid rgba(20, 120, 138, .55); outline-offset: 0; }

@media (prefers-reduced-motion: reduce) {
    .mt-fab:active { transform: none; }
    .mt-fab.mt-llamar { animation: none; }
}
