/* ============================================================
   admin-tutorial-junta.css — recorrido guiado de la Junta Directiva
   (js/admin-tutorial-junta.js), 2-dic-2026.

   Copia del tutorial del sitio público (public/css/tutorial.css) con
   prefijo .tj-* y los colores del panel: #99b715 como fondo lleva texto
   oscuro; como texto o borde sobre blanco, el verde oscuro (--adm-verde-texto).
   Las capas van justo DEBAJO de la marca de agua de la Junta
   (.adm-marca-junta, z-index 2147483000): su nombre se ve también encima
   del recorrido.
   ============================================================ */

.tj-capa,
.tj-foco,
.tj-globo,
.tj-globo *,
.tj-globo *::before,
.tj-globo *::after { box-sizing: border-box; }

/* Capa que tapa la página (recibe los clics) con la sombra en SVG: el hueco
   de lo resaltado lo dibuja admin-tutorial-junta.js. */
.tj-capa {
    position: fixed;
    inset: 0;
    z-index: 2147482990;
}

.tj-sombra {
    display: block;
    width: 100%;
    height: 100%;
    fill: rgba(16, 22, 12, .6);
}

/* Anillo verde alrededor de lo resaltado. */
.tj-foco {
    position: fixed;
    z-index: 2147482991;
    border-radius: 12px;
    pointer-events: none;
    box-shadow: 0 0 0 3px #99b715, 0 0 0 8px rgba(153, 183, 21, .3);
}

.tj-foco[hidden] { display: none; }

/* ===== GLOBO ===== */
.tj-globo {
    position: fixed;
    z-index: 2147482992;
    width: min(410px, calc(100vw - 32px));
    padding: 14px 20px 14px;
    border-radius: 16px;
    background: #fff;
    color: #1a1f23;
    box-shadow: 0 18px 50px rgba(16, 22, 12, .32), 0 2px 6px rgba(16, 22, 12, .12);
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: left;
    outline: none;
    -webkit-user-select: none;
    user-select: none;
}

.tj-globo.tj-entra { animation: tj-entra .22s ease; }

@keyframes tj-entra {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

/* Sin nada que resaltar: centrado en lo que se ve (lo ubica el JS). */
.tj-globo-centro { width: min(460px, calc(100vw - 32px)); }

/* En el celular el globo va pegado abajo, como una hoja (el ancho y la altura los pone el JS). */
.tj-globo-hoja {
    border-radius: 18px 18px 0 0;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
}

/* ===== FLECHA (apunta a lo resaltado) ===== */
.tj-flecha {
    position: absolute;
    display: none;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    background: #fff;
    transform: rotate(45deg);
}

.tj-globo[data-lado="abajo"] .tj-flecha { display: block; top: 0; }
.tj-globo[data-lado="arriba"] .tj-flecha { display: block; top: 100%; }
.tj-globo[data-lado="derecha"] .tj-flecha { display: block; left: 0; }
.tj-globo[data-lado="izquierda"] .tj-flecha { display: block; left: 100%; }

/* ===== CONTENIDO ===== */
.tj-cabeza {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tj-etiqueta {
    margin: 0;
    padding: 3px 10px;
    border-radius: 999px;
    background: #f1f6e2;
    color: #4c6b0e;
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.tj-saltar,
.tj-no-volver {
    min-height: 34px;
    padding: 4px 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: #5b6670;
    font: inherit;
    font-size: .86rem;
    cursor: pointer;
}

.tj-saltar { margin: 0 -8px 0 auto; font-weight: 600; }
.tj-saltar:hover,
.tj-no-volver:hover { background: #f1f6e2; color: #1a1f23; }

.tj-no-volver {
    margin-left: -8px;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.tj-barra {
    height: 4px;
    margin: 12px 0 2px;
    border-radius: 999px;
    background: #eef2e3;
    overflow: hidden;
}

.tj-barra-relleno {
    display: block;
    height: 100%;
    width: 0;
    border-radius: inherit;
    background: #99b715;
    transition: width .25s ease;
}

/* Si el texto es largo, se desplaza por dentro: los botones siempre se ven. */
.tj-contenido {
    max-height: min(56vh, 430px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.tj-titulo {
    margin: 10px 0 6px;
    color: #1a1f23;
    font-family: inherit;
    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.3;
}

.tj-texto p {
    margin: 0 0 8px;
    color: #46515b;
    font-size: .94rem;
}

.tj-lista {
    margin: 0 0 8px;
    padding: 0;
    list-style: none;
}

.tj-lista li {
    position: relative;
    margin: 0 0 6px;
    padding-left: 16px;
    color: #46515b;
    font-size: .93rem;
}

.tj-lista li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .62em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #99b715;
}

.tj-lista b { color: #1a1f23; font-weight: 600; }

.tj-pie {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid #eef0ea;
}

.tj-contador {
    margin: 0;
    color: #5b6670;
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.tj-botones { display: flex; gap: 8px; margin-left: auto; }

.tj-btn {
    min-height: 42px;
    padding: 8px 15px;
    border-radius: 999px;
    font: inherit;
    font-size: .93rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}

.tj-btn-primario {
    border: 0;
    background: #99b715;
    color: #1a1f23;
}

.tj-btn-primario:hover { background: #8aa513; }

.tj-btn-secundario {
    border: 1.5px solid #679114;
    background: #fff;
    color: #4c6b0e;
}

.tj-btn-secundario:hover { background: #f1f6e2; }

.tj-btn:disabled {
    opacity: .4;
    cursor: default;
}

.tj-globo button:focus-visible {
    outline: 3px solid #1a1f23;
    outline-offset: 2px;
}

/* ===== «VER EL TUTORIAL», junto al título del informe ===== */
.tj-disparador {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: none;
    min-height: 28px;
    padding: 3px 11px 3px 5px;
    border: 1.5px solid #dde2d4;
    border-radius: 999px;
    background: #fff;
    color: #4c6b0e;
    font: inherit;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.tj-disparador::before {
    content: "";
    width: 18px;
    height: 18px;
    flex: none;
    border-radius: 50%;
    /* El triángulo de «reproducir» sobre el círculo verde (la CSP del panel deja imágenes data:). */
    background: #99b715 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 10'%3E%3Cpath d='M0 0L8 5L0 10Z' fill='%231a1f23'/%3E%3C/svg%3E") 58% 50% / 7px 9px no-repeat;
}

.tj-disparador:hover { background: #f1f6e2; border-color: #99b715; }
.tj-disparador:focus-visible { outline: 3px solid rgba(153, 183, 21, .55); outline-offset: 2px; }
.tj-disparador[hidden] { display: none; }

/* Al cerrar el recorrido: un momento resaltado, para saber dónde se vuelve a abrir. */
.tj-disparador.tj-avisar { animation: tj-avisar 1.2s ease-in-out 2; }

@keyframes tj-avisar {
    0%, 100% { box-shadow: 0 0 0 0 rgba(153, 183, 21, 0); border-color: #dde2d4; }
    50% { box-shadow: 0 0 0 6px rgba(153, 183, 21, .35); border-color: #99b715; }
}

@media (max-width: 639px) {
    .tj-pie { flex-wrap: wrap; }
    .tj-botones { flex: 1 1 auto; justify-content: flex-end; }
    .tj-contenido { max-height: 42vh; }
    .tj-disparador { padding-right: 5px; font-size: 0; gap: 0; }
    .tj-disparador::before { width: 20px; height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .tj-barra-relleno,
    .tj-btn,
    .tj-disparador { transition: none; }
    .tj-globo.tj-entra,
    .tj-disparador.tj-avisar { animation: none; }
}

@media print {
    .tj-capa,
    .tj-foco,
    .tj-globo,
    .tj-disparador { display: none !important; }
}
