/* Ayuda en linea: boton "? Ayuda" del encabezado, panel lateral de 440 px, aviso de primera vez y recorrido guiado
   (ayuda.js). Misma paleta y tipografias que Soporte (app.css: --brand-navy, --brand-accent, --surface, --border-soft). */

/* ---------------------------------------------------------------- Boton del encabezado */
.ayuda-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 36px;
    padding: 0 14px 0 8px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: #fff;
    color: var(--brand-navy);
    font-family: 'Inter Tight', 'Inter', sans-serif;
    font-weight: 600;
    font-size: 13.5px;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

    .ayuda-btn:hover { border-color: var(--brand-accent); background: var(--surface); }
    .ayuda-btn.activo { border-color: var(--brand-navy); background: #eef3f9; }

.ayuda-btn-ic {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: var(--brand-navy);
    color: #fff;
    display: inline-grid;
    place-items: center;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}

/* ---------------------------------------------------------------- Panel */
.ayuda-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(440px, 100%);
    z-index: 1035;
    background: #fff;
    border-left: 1px solid var(--border-soft);
    box-shadow: -18px 0 50px rgba(15, 39, 66, .18);
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    animation: ayuda-entra .2s ease-out;
}

@keyframes ayuda-entra { from { transform: translateX(30px); opacity: 0; } }

.ayuda-cab {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 60px 13px 18px;
    border-bottom: 1px solid var(--border-soft);
    min-height: 64px;
}

.ayuda-cab-ic {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--brand-navy);
    color: #fff;
    display: inline-grid;
    place-items: center;
    flex: none;
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.ayuda-cab-txt { display: flex; flex-direction: column; min-width: 0; }
    .ayuda-cab-txt h2 { font-family: 'Outfit', 'Inter', sans-serif; font-size: 19px; font-weight: 600; margin: 0; color: var(--brand-navy); line-height: 1.15; }
    .ayuda-cab-txt span { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ayuda-buscar {
    position: relative;
    margin: 14px 18px 4px;
    display: flex;
    align-items: center;
}

    .ayuda-buscar svg { position: absolute; left: 12px; width: 16px; height: 16px; color: #8a97a8; pointer-events: none; }

    .ayuda-buscar input {
        width: 100%;
        height: 38px;
        padding: 0 34px 0 36px;
        border: 1px solid var(--border-soft);
        border-radius: 10px;
        background: var(--surface);
        font-family: inherit;
        font-size: 14px;
        color: #1f2b3a;
        transition: border-color .15s, box-shadow .15s, background .15s;
    }

        .ayuda-buscar input::-webkit-search-cancel-button { display: none; }
        .ayuda-buscar input:focus { outline: none; background: #fff; border-color: var(--brand-accent); box-shadow: 0 0 0 3px rgba(61, 139, 219, .15); }

.ayuda-buscar-x {
    position: absolute;
    right: 8px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: #e3e9f0;
    color: #475569;
    font-size: 10px;
    line-height: 1;
}

.ayuda-cuerpo { flex: 1; min-height: 0; overflow-y: auto; padding: 12px 18px 18px; }

.ayuda-cargando, .ayuda-sin-resultados { padding: 26px 6px; text-align: center; color: var(--text-muted); font-size: 14px; }

.ayuda-resultados { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }

    .ayuda-resultados button {
        width: 100%;
        text-align: left;
        border: 1px solid var(--border-soft);
        border-radius: var(--radius-md);
        background: #fff;
        padding: 10px 12px;
        display: flex;
        flex-direction: column;
        gap: 3px;
        transition: border-color .15s, background .15s;
    }

        .ayuda-resultados button:hover { border-color: var(--brand-accent); background: #f7fafd; }
        .ayuda-resultados b { font-size: 14px; color: var(--brand-navy); font-weight: 600; }
        .ayuda-resultados span { font-size: 12.5px; color: #5b6878; line-height: 1.4; }

.ayuda-volver { border: 0; background: none; padding: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--brand-accent); }

/* Tarjeta "Ver recorrido", arriba del articulo. */
.ayuda-recorrido {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border: 1px solid #cfe0f3;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, #eef5fd, #f7fafe);
    text-align: left;
    transition: border-color .15s, box-shadow .15s;
}

    .ayuda-recorrido:hover { border-color: var(--brand-accent); box-shadow: 0 4px 14px rgba(61, 139, 219, .14); }

.ayuda-recorrido-ic {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: var(--brand-navy);
    color: #fff;
    display: inline-grid;
    place-items: center;
    flex: none;
}

    .ayuda-recorrido-ic svg { width: 16px; height: 16px; margin-left: 2px; }

.ayuda-recorrido-txt { display: flex; flex-direction: column; }
    .ayuda-recorrido-txt b { font-size: 14.5px; color: var(--brand-navy); font-weight: 600; }
    .ayuda-recorrido-txt span { font-size: 12.5px; color: #5b6878; }

.ayuda-aviso { margin: -6px 0 14px; padding: 8px 12px; border-radius: 10px; background: #fff7e6; border: 1px solid #f3d9a4; color: #7a4b00; font-size: 13px; }
.ayuda-aviso-err { margin: 12px 0 0; background: #fdecec; border-color: #f5c2c2; color: #9b1c1c; }

/* Articulo (panel y vista previa de Plataforma). */
.ayuda-art-tit { font-family: 'Outfit', 'Inter', sans-serif; font-size: 20px; font-weight: 600; color: var(--brand-navy); margin: 2px 0 10px; line-height: 1.25; }

.ayuda-sec { padding: 12px 0 4px; border-top: 1px solid #eef2f6; }
    .ayuda-sec:first-of-type { border-top: 0; padding-top: 0; }

.ayuda-sec-tit {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 0 0 7px;
}

.ayuda-md { font-size: 14px; line-height: 1.55; color: #2a3646; }
    .ayuda-md p { margin: 0 0 8px; }
    .ayuda-md ul, .ayuda-md ol { margin: 0 0 8px; padding-left: 20px; }
    .ayuda-md li { margin: 0 0 5px; }
    .ayuda-md li::marker { color: #8a97a8; }
    .ayuda-md ol li::marker { color: var(--brand-accent); font-weight: 700; }
    .ayuda-md strong { color: #16233a; font-weight: 600; }
    .ayuda-md code { font-family: 'Space Mono', monospace; font-size: 12.5px; background: #f1f4f8; border-radius: 4px; padding: 1px 4px; }
    .ayuda-md h4 { font-size: 14px; font-weight: 600; color: var(--brand-navy); margin: 8px 0 4px; }

.ayuda-vacio { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 40px 18px 24px; color: var(--text-muted); font-size: 13.5px; }
    .ayuda-vacio b { color: var(--brand-navy); font-size: 15px; font-weight: 600; }

.ayuda-vacio-ic { width: 48px; height: 48px; border-radius: 14px; background: var(--surface); color: #8a97a8; display: grid; place-items: center; margin-bottom: 4px; }
    .ayuda-vacio-ic svg { width: 24px; height: 24px; }

.ayuda-pie {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 8px;
    padding: 12px 18px 14px;
    border-top: 1px solid var(--border-soft);
    background: #fbfcfe;
    font-size: 13px;
}

.ayuda-sirvio { color: #3d4a5c; font-weight: 500; }

.ayuda-voto {
    height: 28px;
    padding: 0 12px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: #fff;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--brand-navy);
    transition: border-color .15s, background .15s;
}

    .ayuda-voto:hover { border-color: var(--brand-accent); background: #f2f8fe; }

.ayuda-gracias { color: #17703d; font-weight: 600; }

.ayuda-consultar { margin-left: auto; border: 0; background: none; padding: 0; font-size: 13px; color: #5b6878; }
    .ayuda-consultar b { color: var(--brand-accent); font-weight: 600; }
    .ayuda-consultar:hover b { text-decoration: underline; text-underline-offset: 2px; }

/* ---------------------------------------------------------------- Aviso de primera vez */
.ayuda-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px 9px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 39, 66, .16);
    font-size: 13.5px;
    color: #2a3646;
    animation: ayuda-sube .25s ease-out;
}

@keyframes ayuda-sube { from { transform: translateY(12px); opacity: 0; } }

.ayuda-toast-ic { width: 24px; height: 24px; border-radius: 999px; background: var(--brand-navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.ayuda-toast-ver { border: 0; border-radius: 999px; background: var(--brand-navy); color: #fff; height: 30px; padding: 0 14px; font-size: 13px; font-weight: 600; }
.ayuda-toast-x { border: 0; background: none; width: 26px; height: 26px; border-radius: 999px; color: #7a8696; font-size: 11px; }
    .ayuda-toast-x:hover { background: var(--surface); }

/* ---------------------------------------------------------------- Recorrido (ayuda.js) */
.ayuda-tour { position: fixed; inset: 0; z-index: 1070; pointer-events: none; font-family: 'Inter', sans-serif; }

/* El resaltado oscurece todo menos el elemento y no captura clics: la pantalla sigue usable. */
.ayuda-tour-resalte {
    position: fixed;
    border-radius: 10px;
    box-shadow: 0 0 0 3px #3d8bdb, 0 0 0 9999px rgba(15, 30, 52, .52);
    transition: top .25s ease, left .25s ease, width .25s ease, height .25s ease;
    pointer-events: none;
}

.ayuda-tour-tarjeta {
    position: fixed;
    width: min(340px, calc(100vw - 16px));
    padding: 14px 16px 12px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 30, 52, .3);
    pointer-events: auto;
    transition: top .25s ease, left .25s ease;
}

.ayuda-tour-n { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-accent); margin-bottom: 3px; }
.ayuda-tour-tit { display: block; font-family: 'Outfit', 'Inter', sans-serif; font-size: 16.5px; font-weight: 600; color: var(--brand-navy); margin-bottom: 4px; }
.ayuda-tour-txt { margin: 0 0 12px; font-size: 13.5px; line-height: 1.5; color: #3d4a5c; }
.ayuda-tour-espera { margin: -4px 0 12px; padding: 7px 10px; border-radius: 8px; background: #f2f8fe; color: #2c5a8a; font-size: 12.5px; line-height: 1.45; }
.ayuda-tour-acc { display: flex; justify-content: flex-end; gap: 8px; }

.ayuda-tour-btn {
    height: 32px;
    padding: 0 14px;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    background: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-navy);
    cursor: pointer;
}

    .ayuda-tour-btn:disabled { opacity: .4; cursor: default; }
    .ayuda-tour-btn-pri { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }

.ayuda-tour-barra {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 10px 8px 16px;
    border-radius: 999px;
    background: #16233a;
    color: #fff;
    box-shadow: 0 12px 30px rgba(15, 30, 52, .35);
    pointer-events: auto;
    font-size: 13px;
    white-space: nowrap;
}

.ayuda-tour-puntos { display: flex; gap: 5px; }
    .ayuda-tour-puntos span { width: 7px; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .28); transition: background .2s, width .2s; }
    .ayuda-tour-puntos span.visto { background: rgba(255, 255, 255, .6); }
    .ayuda-tour-puntos span.on { width: 18px; background: #7fb6ec; }

.ayuda-tour-cuenta { color: rgba(255, 255, 255, .75); font-variant-numeric: tabular-nums; }

.ayuda-tour-volver, .ayuda-tour-salir {
    height: 30px;
    padding: 0 12px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.ayuda-tour-volver { background: rgba(255, 255, 255, .12); color: #fff; }
    .ayuda-tour-volver:hover { background: rgba(255, 255, 255, .2); }
.ayuda-tour-salir { background: #fff; color: #16233a; }

/* ---------------------------------------------------------------- Volt Soporte (fase 2b), debajo del articulo */
.ayuda-volt {
    margin-top: 16px;
    padding: 12px 14px 14px;
    border: 1px solid #e3d8fb;
    border-radius: var(--radius-md);
    background: linear-gradient(160deg, #f7f3ff, #fbfaff);
}

.ayuda-volt-cab { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
    .ayuda-volt-cab b { font-size: 13.5px; font-weight: 600; color: #3b2a7a; }

.ayuda-volt-ic { width: 24px; height: 24px; border-radius: 8px; background: #6d4fd8; color: #fff; display: grid; place-items: center; flex: none; }
    .ayuda-volt-ic svg { width: 14px; height: 14px; }

.ayuda-volt-txt {
    width: 100%;
    resize: vertical;
    min-height: 54px;
    padding: 8px 10px;
    border: 1px solid #ddd2f7;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 13.5px;
    color: #1f2b3a;
}

    .ayuda-volt-txt:focus { outline: none; border-color: #6d4fd8; box-shadow: 0 0 0 3px rgba(109, 79, 216, .14); }

.ayuda-volt-acc { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 12px; color: #6b6290; }

.ayuda-volt-btn {
    height: 30px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: #6d4fd8;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

    .ayuda-volt-btn:disabled { opacity: .45; }

.ayuda-volt-resp { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e9e1fb; }
.ayuda-volt-citas { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: #6b6290; }
    .ayuda-volt-citas button { border: 1px solid #ddd2f7; border-radius: 999px; background: #fff; padding: 2px 10px; font-size: 12px; font-weight: 600; color: #4a35a8; }
.ayuda-volt-sin { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: #3d4a5c; }
    .ayuda-volt-sin .ayuda-consultar { margin-left: 0; }

@media (max-width: 560px) {
    .ayuda-btn { padding: 0 8px; }
    .ayuda-tour-barra { left: 8px; right: 8px; transform: none; justify-content: space-between; gap: 8px; }
    .ayuda-tour-cuenta { display: none; }
}

@media print {
    .ayuda-panel, .ayuda-toast, .ayuda-tour { display: none !important; }
}
