/* ==========================================================================
   FETRI 2026 · Tritón, el asistente de la web
   Botón flotante abajo a la derecha y panel de chat (hoja inferior en el móvil).
   Solo en las páginas rediseñadas (html.f26c): fuera de ellas no se ve.
   ========================================================================== */

.f26-bot { display: none; }
html.f26c .f26-bot { display: block; font-family: var(--f26-font); }

/* ---------- dos niveles de movimiento ----------
   Con "reducir movimiento" (Windows con los efectos de animación apagados, muy habitual) Tritón sigue vivo con
   animaciones pequeñas y suaves: parpadea, le brillan las gafas, respira muy poco, mira a los lados, mueve la boca
   al hablar, y los puntos de "pensando" y el halo de cuando llama laten solo con la opacidad.
   Sin esa preferencia se suman los movimientos grandes: balanceo de la cabeza, saludo amplio, saltito al llamar,
   onda alrededor del botón, cabeza ladeada al pensar y entradas que se deslizan.
   Cada estado (llamar, pensar, hablar, saludar) se escribe una sola vez y toma el nombre de su animación de estas
   variables. */
html.f26c .f26-bot {
    --bt-breath: f26BotBreathLite;
    --bt-sway: none;
    --bt-wave: f26BotWaveLite;
    --bt-hello: f26BotHelloLite;
    --bt-call-wave: f26BotCallWaveLite;
    --bt-goggles: none;
    --bt-hop: none;
    --bt-halo: f26BotHaloLite;
    --bt-tilt: none;
    --bt-tap: none;
    --bt-chin-in: f26BotFade;
    --bt-in: f26BotFade;
    --bt-pop: f26BotFade;
    --bt-badge: f26BotFade;
    --bt-dots: f26BotDotFade;
    --bt-sheet: f26BotFade;
}
@media (prefers-reduced-motion: no-preference) {
    html.f26c .f26-bot {
        --bt-breath: f26BotBreath;
        --bt-sway: f26BotSway;
        --bt-wave: f26BotWave;
        --bt-hello: f26BotHello;
        --bt-call-wave: f26BotCallWave;
        --bt-goggles: f26BotGoggles;
        --bt-hop: f26BotHop;
        --bt-halo: f26BotRipple;
        --bt-tilt: f26BotTilt;
        --bt-tap: f26BotTap;
        --bt-chin-in: f26BotChinIn;
        --bt-in: f26BotIn;
        --bt-pop: f26BotPop;
        --bt-badge: f26BotBadgePop;
        --bt-dots: f26BotDotBounce;
        --bt-sheet: f26BotUp;
    }
}

/* ---------- botón ----------
   La cara va recortada en su propio círculo (.f26-bot__face) para que el halo y el globo con el "1"
   puedan salir por fuera del botón. En tablet y móvil se apoya encima de la barra inferior. */
html.f26c .f26-bot__launcher {
    position: fixed;
    right: 20px;
    bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 20px);
    z-index: 1036;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    transition: transform .2s ease;
    -webkit-tap-highlight-color: transparent;
}
html.f26c .f26-bot__face {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--f26-red-soft);
    box-shadow: 0 0 0 3px var(--f26-gold), var(--f26-shadow-3);
    overflow: hidden;
    transition: box-shadow .2s ease;
}
@media (hover: hover) {
    html.f26c .f26-bot__launcher:hover { transform: translateY(-2px) scale(1.04); }
}
html.f26c .f26-bot__launcher:focus-visible { outline: none; }
html.f26c .f26-bot__launcher:focus-visible .f26-bot__face { box-shadow: 0 0 0 3px var(--f26-gold), var(--f26-focus), var(--f26-shadow-3); }
html.f26c .f26-bot__launcher-avatar { width: 100%; height: 100%; display: block; transform: translateY(4px); }
html.f26c .f26-bot__launcher-x {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--f26-ink);
    color: #fff;
    font-size: 22px;
}
html.f26c .f26-bot.is-open .f26-bot__launcher-x { display: flex; }
/* con el chat abierto la cara del botón no se ve: no se anima */
html.f26c .f26-bot.is-open .f26-bot__launcher-avatar { display: none; }

/* halo que late alrededor del botón cuando Tritón llama */
html.f26c .f26-bot__launcher::before {
    content: "";
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 3px solid var(--f26-gold);
    opacity: 0;
    pointer-events: none;
}
/* globo rojo con el "1": hay un mensaje de Tritón sin leer */
html.f26c .f26-bot__badge-new {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    background: var(--f26-red);
    box-shadow: 0 0 0 2px #fff, var(--f26-shadow-2);
    color: #fff;
    font: 800 12px/22px var(--f26-font);
    text-align: center;
    pointer-events: none;
    animation: var(--bt-badge) .45s cubic-bezier(.3, 1.6, .5, 1) both;
}

/* Los botones flotantes de la página se apilan encima de Tritón sin pisarse: "volver arriba" justo encima y,
   en la clasificación de una prueba, "volver al horario" encima de ese (siempre en el mismo sitio, aunque
   "volver arriba" aún no se vea). Centrados con Tritón. */
html.f26c .scroll-to-top { bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 92px) !important; right: 28px !important; }
html.f26c .return-to-schedule-btn { right: 28px; bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 148px); }
@media (min-width: 768px) and (max-width: 991.98px) {
    /* en tableta los dos miden 40 px */
    html.f26c .return-to-schedule-btn { bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 144px); }
}

/* ---------- Tritón animado ----------
   Todo con transform/opacity (barato en el móvil). Las piezas giran sobre su punto natural:
   la cabeza sobre el cuello, el brazo sobre el hombro, las cejas sobre su centro. */
.f26-bot-avatar :is(.f26-bot-head, .f26-bot-body, .f26-bot-arm, .f26-bot-gaze, .f26-bot-look, .f26-bot-eyes, .f26-bot-mouth,
    .f26-bot-hmm, .f26-bot-glint, .f26-bot-goggles, .f26-bot-brows, .f26-bot-brow-l, .f26-bot-brow-r, .f26-bot-cheeks, .f26-bot-chin) {
    transform-box: view-box;
}

/* respira */
.f26-bot-avatar .f26-bot-body { transform-origin: 60px 120px; animation: var(--bt-breath, none) 3.6s ease-in-out infinite; }
@keyframes f26BotBreathLite { 0%, 100% { transform: none; } 50% { transform: scale(1.006, 1.012); } }
@keyframes f26BotBreath { 0%, 100% { transform: none; } 50% { transform: scale(1.015, 1.03); } }

/* la cabeza se balancea (solo sin "reducir movimiento") */
.f26-bot-avatar .f26-bot-head { transform-origin: 60px 86px; animation: var(--bt-sway, none) 7.2s ease-in-out infinite; transition: transform .3s ease; }
@keyframes f26BotSway {
    0%, 100% { transform: none; }
    25% { transform: translateY(-.8px) rotate(-3.5deg); }
    50% { transform: none; }
    75% { transform: translateY(-.8px) rotate(3deg); }
}

/* parpadea: uno suelto y, más tarde, uno doble */
.f26-bot-avatar .f26-bot-eyes { transform-origin: 60px 60px; animation: f26BotBlink 9s infinite; }
@keyframes f26BotBlink {
    0%, 40%, 43%, 86%, 88.4%, 89.6%, 92%, 100% { transform: none; }
    41.5%, 87.2%, 90.8% { transform: scaleY(.1); }
}

/* mira a un lado y a otro de vez en cuando */
.f26-bot-avatar .f26-bot-look { animation: f26BotLook 13s ease-in-out 2s infinite; transition: transform .3s ease; }
@keyframes f26BotLook {
    0%, 24%, 40%, 62%, 80%, 100% { transform: none; }
    28%, 36% { transform: translate(-3px, .4px); }
    66%, 76% { transform: translate(3px, -1.2px); }
}

/* los ojos siguen al puntero cerca del botón (escritorio; lo mueve f26.botEyes con dos variables) */
.f26-bot-avatar .f26-bot-gaze { transform: translate(var(--f26-gx, 0px), var(--f26-gy, 0px)); transition: transform .18s ease-out; }
html.f26c .f26-bot__launcher[data-track] .f26-bot-look { animation: none; }

/* destello en las gafas */
.f26-bot-avatar .f26-bot-glint { animation: f26BotGlint 7s ease-in-out infinite; }
@keyframes f26BotGlint { 0%, 70% { transform: none; } 85%, 100% { transform: translateX(62px); } }

/* se ajusta las gafas de vez en cuando (solo sin "reducir movimiento") */
.f26-bot-avatar .f26-bot-goggles { transform-origin: 60px 40px; animation: var(--bt-goggles, none) 17s ease-in-out 5s infinite; }
@keyframes f26BotGoggles {
    0%, 88%, 96.5%, 100% { transform: none; }
    90.5% { transform: translateY(-3.2px); }
    93% { transform: translateY(.9px); }
    95% { transform: translateY(-.4px); }
}

/* cejas, mofletes, boca y mano de pensar: cambian de forma con transiciones cortas */
.f26-bot-avatar .f26-bot-brows,
.f26-bot-avatar .f26-bot-cheeks,
.f26-bot-avatar .f26-bot-hmm,
.f26-bot-avatar .f26-bot-chin { transition: opacity .2s ease; }
.f26-bot-avatar .f26-bot-brow-l { transform-origin: 49px 49.5px; transition: transform .25s ease; }
.f26-bot-avatar .f26-bot-brow-r { transform-origin: 71px 49.5px; transition: transform .25s ease; }
.f26-bot-avatar .f26-bot-mouth { transform-origin: 60px 71px; transition: transform .2s ease, opacity .15s ease; }
.f26-bot-avatar .f26-bot-chin { transform-origin: 74px 112px; }

/* el brazo está escondido detrás del cuerpo hasta que saluda (en el botón, cada 18 s) */
.f26-bot-avatar .f26-bot-arm { transform-origin: 86px 104px; transform: rotate(70deg); opacity: 0; }
.f26-bot-avatar.is-waving .f26-bot-arm { animation: var(--bt-wave, none) 18s ease-in-out 3s infinite; }
.f26-bot-avatar.is-hello .f26-bot-arm { animation: var(--bt-hello, none) 1.8s ease-in-out .2s 1 both; }
@keyframes f26BotWave {
    0% { transform: rotate(70deg); opacity: 0; }
    2.5% { transform: rotate(0); opacity: 1; }
    4.5% { transform: rotate(-16deg); }
    6.5% { transform: rotate(8deg); }
    8.5% { transform: rotate(-16deg); }
    10.5% { transform: rotate(6deg); }
    12.5% { transform: rotate(0); opacity: 1; }
    15%, 100% { transform: rotate(70deg); opacity: 0; }
}
@keyframes f26BotWaveLite {
    0% { transform: rotate(-3deg); opacity: 0; }
    2.5% { opacity: 1; }
    5% { transform: rotate(4deg); }
    7.5% { transform: rotate(-3deg); }
    10% { transform: rotate(4deg); opacity: 1; }
    13%, 100% { transform: rotate(-3deg); opacity: 0; }
}
@keyframes f26BotHello {
    0% { transform: rotate(70deg); opacity: 0; }
    15% { transform: rotate(0); opacity: 1; }
    30% { transform: rotate(-16deg); }
    45% { transform: rotate(8deg); }
    60% { transform: rotate(-16deg); }
    75% { transform: rotate(0); opacity: 1; }
    100% { transform: rotate(70deg); opacity: 0; }
}
@keyframes f26BotHelloLite {
    0% { transform: rotate(-3deg); opacity: 0; }
    15% { opacity: 1; }
    35% { transform: rotate(4deg); }
    55% { transform: rotate(-3deg); }
    75% { transform: rotate(4deg); opacity: 1; }
    100% { transform: rotate(-3deg); opacity: 0; }
}

/* habla: la boca se abre y se cierra a ritmo de sílabas */
.f26-bot-avatar.is-talking .f26-bot-mouth { animation: f26BotTalk 1.1s linear infinite; }
@keyframes f26BotTalk {
    0%, 100% { transform: none; }
    12% { transform: scale(.85, .42); }
    26% { transform: scale(.95, .8); }
    38% { transform: scale(.8, .36); }
    52% { transform: none; }
    64% { transform: scale(.9, .5); }
    78% { transform: scale(.82, .64); }
    90% { transform: scale(.9, .32); }
}

/* piensa: mira hacia arriba, levanta una ceja, pone boca de "mmm" y se lleva la mano a la barbilla;
   sin "reducir movimiento" además ladea la cabeza y da golpecitos con el dedo */
.f26-bot-avatar.is-thinking .f26-bot-look { animation: f26BotPonder 2.6s ease-in-out infinite; }
.f26-bot-avatar.is-thinking .f26-bot-head { animation: var(--bt-tilt, none) 2.6s ease-in-out infinite; }
.f26-bot-avatar.is-thinking .f26-bot-brows { opacity: 1; }
.f26-bot-avatar.is-thinking .f26-bot-brow-l { transform: translateY(.8px) rotate(5deg); }
.f26-bot-avatar.is-thinking .f26-bot-brow-r { transform: translate(.4px, -1.8px) rotate(-10deg); }
.f26-bot-avatar.is-thinking .f26-bot-mouth { opacity: 0; }
.f26-bot-avatar.is-thinking .f26-bot-hmm { opacity: 1; }
.f26-bot-avatar.is-thinking .f26-bot-chin { opacity: 1; animation: var(--bt-chin-in, none) .3s ease-out both, var(--bt-tap, none) 1.3s ease-in-out .3s infinite; }
.f26-bot-avatar.is-thinking .f26-bot-arm { animation: none; opacity: 0; }
@keyframes f26BotPonder {
    0%, 100% { transform: translate(2.6px, -3.4px); }
    50% { transform: translate(1.2px, -3.8px); }
}
@keyframes f26BotTilt {
    0%, 100% { transform: rotate(-6deg); }
    50% { transform: rotate(-4deg) translateY(-.6px); }
}
@keyframes f26BotChinIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes f26BotTap {
    0%, 55%, 100% { transform: none; }
    66% { transform: rotate(-5deg); }
    77% { transform: none; }
    86% { transform: rotate(-4deg); }
}

/* al pasar el ratón por el botón sonríe más, se le suben las cejas, se ruboriza y saluda */
@media (hover: hover) {
    html.f26c .f26-bot__launcher:hover .f26-bot-avatar .f26-bot-mouth { transform: scale(1.14, 1.22); }
    html.f26c .f26-bot__launcher:hover .f26-bot-avatar .f26-bot-cheeks { opacity: .75; }
    html.f26c .f26-bot__launcher:hover .f26-bot-avatar .f26-bot-brows { opacity: 1; }
    html.f26c .f26-bot__launcher:hover .f26-bot-avatar :is(.f26-bot-brow-l, .f26-bot-brow-r) { transform: translateY(-1.4px); }
    html.f26c .f26-bot__launcher:hover .f26-bot-avatar .f26-bot-arm { animation: var(--bt-hello, none) 1.8s ease-in-out 1 both; }
}

/* ---------- Tritón llama ----------
   is-calling mientras se ve el aviso: saluda, da un toquecito (saltito, o halo que late con "reducir movimiento"),
   pone cara de alegría y enseña el globo con el "1" (has-unread) hasta que se abre el chat. */
html.f26c .f26-bot.is-calling .f26-bot__launcher { animation: var(--bt-hop, none) 4s ease-in-out .4s infinite; }
html.f26c .f26-bot.is-calling .f26-bot__launcher::before { animation: var(--bt-halo, none) 4s ease-out .4s infinite; }
html.f26c .f26-bot.is-calling .f26-bot__launcher .f26-bot-avatar .f26-bot-arm { animation: var(--bt-call-wave, none) 4s ease-in-out .4s infinite; }
html.f26c .f26-bot.is-calling .f26-bot__launcher .f26-bot-avatar .f26-bot-mouth { transform: scale(1.12, 1.18); }
html.f26c .f26-bot.is-calling .f26-bot__launcher .f26-bot-avatar .f26-bot-cheeks { opacity: .7; }
html.f26c .f26-bot.is-calling .f26-bot__launcher .f26-bot-avatar .f26-bot-brows { opacity: 1; }
html.f26c .f26-bot.is-calling .f26-bot__launcher .f26-bot-avatar :is(.f26-bot-brow-l, .f26-bot-brow-r) { transform: translateY(-1.4px); }
@keyframes f26BotHop {
    0%, 30%, 100% { transform: none; }
    8% { transform: translateY(-7px); }
    16% { transform: none; }
    21% { transform: translateY(-2.5px); }
}
@keyframes f26BotRipple {
    0% { transform: scale(.92); opacity: .95; }
    40%, 100% { transform: scale(1.3); opacity: 0; }
}
@keyframes f26BotHaloLite {
    0%, 50%, 100% { opacity: .15; }
    18% { opacity: .95; }
    68% { opacity: .8; }
}
@keyframes f26BotCallWave {
    0% { transform: rotate(70deg); opacity: 0; }
    8% { transform: rotate(0); opacity: 1; }
    16% { transform: rotate(-16deg); }
    24% { transform: rotate(8deg); }
    32% { transform: rotate(-16deg); }
    40% { transform: rotate(0); opacity: 1; }
    50%, 100% { transform: rotate(70deg); opacity: 0; }
}
@keyframes f26BotCallWaveLite {
    0% { transform: rotate(-3deg); opacity: 0; }
    8% { opacity: 1; }
    18% { transform: rotate(4deg); }
    28% { transform: rotate(-3deg); }
    38% { transform: rotate(4deg); opacity: 1; }
    50%, 100% { transform: rotate(-3deg); opacity: 0; }
}
@keyframes f26BotBadgePop { 0% { opacity: 0; transform: scale(.3); } 100% { opacity: 1; transform: none; } }

/* ---------- aviso: Tritón llama según la página ---------- */
html.f26c .f26-bot__teaser {
    position: fixed;
    right: 94px;
    bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 24px);
    z-index: 1036;
    display: flex;
    align-items: flex-start;
    gap: 2px;
    max-width: 272px;
    padding: 4px 4px 4px 0;
    border-radius: var(--f26-r) var(--f26-r) 4px var(--f26-r);
    background: var(--f26-surface);
    box-shadow: var(--f26-shadow-3);
    animation: var(--bt-in, none) .3s ease both;
}
/* piquito hacia Tritón */
html.f26c .f26-bot__teaser::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 14px;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: var(--f26-surface);
    transform: rotate(45deg);
}
html.f26c .f26-bot__teaser-txt {
    position: relative;
    z-index: 1;
    border: 0;
    background: none;
    padding: 8px 4px 8px 14px;
    text-align: left;
    font-size: var(--f26-fs-sm);
    line-height: 1.38;
    color: var(--f26-text);
    cursor: pointer;
}
html.f26c .f26-bot__teaser-txt strong { font-weight: 800; }
html.f26c .f26-bot__teaser-go {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--f26-red);
}
html.f26c .f26-bot__teaser-txt:hover .f26-bot__teaser-go { color: var(--f26-red-dk); }
html.f26c .f26-bot__teaser-x {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: var(--f26-mute);
    cursor: pointer;
}
html.f26c .f26-bot__teaser-x:hover { background: var(--f26-tint); color: var(--f26-text); }
html.f26c :is(.f26-bot__teaser-txt, .f26-bot__teaser-x):focus-visible { outline: none; box-shadow: var(--f26-focus); border-radius: 8px; }
/* mientras se escribe en un campo de la página el aviso se aparta (f26.botInit pone html.f26-bot-typing) */
html.f26c.f26-bot-typing .f26-bot__teaser { display: none; }

/* ---------- panel ---------- */
html.f26c .f26-bot__scrim { display: none; }

html.f26c .f26-bot__panel {
    position: fixed;
    right: 20px;
    bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 94px);
    z-index: 1062;
    display: flex;
    flex-direction: column;
    width: 390px;
    height: min(620px, calc(100vh - var(--f26-topbar-h) - var(--f26-bottomnav-h) - 120px));
    border-radius: var(--f26-r-lg);
    background: var(--f26-bg);
    box-shadow: var(--f26-shadow-3);
    overflow: hidden;
    animation: var(--bt-in, none) .22s ease both;
}
@keyframes f26BotIn {
    from { opacity: 0; transform: translateY(12px) scale(.98); }
    to { opacity: 1; transform: none; }
}
@keyframes f26BotFade { from { opacity: 0; } to { opacity: 1; } }

html.f26c .f26-bot__head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    padding: 12px 12px 12px 14px;
    background: var(--f26-ink) var(--f26-tex);
    color: #fff;
    isolation: isolate;
}
html.f26c .f26-bot__head::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: var(--f26-grad-accent);
}
html.f26c .f26-bot__head-face { position: relative; flex: 0 0 auto; width: 44px; height: 44px; }
html.f26c .f26-bot__head-avatar { width: 44px; height: 44px; display: block; border-radius: 50%; box-shadow: 0 0 0 2px var(--f26-gold); }
html.f26c .f26-bot__head-txt { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.2; }
html.f26c .f26-bot__head-txt strong { font-size: var(--f26-fs-md); font-weight: 800; letter-spacing: .01em; }
html.f26c .f26-bot__status {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    font-size: var(--f26-fs-xs);
    font-weight: 600;
    color: var(--f26-on-ink-mute);
    text-transform: uppercase;
    letter-spacing: .06em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    animation: f26BotStatusIn .3s ease both;
}
/* el estado nuevo entra sin dejar la línea en blanco (empieza ya bien visible) */
@keyframes f26BotStatusIn { from { opacity: .6; } to { opacity: 1; } }
/* mientras piensa, el estado va en minúsculas (se lee de un vistazo, como el "escribiendo…" de los chats) */
html.f26c .f26-bot__status.is-busy { color: var(--f26-gold); font-size: 12px; letter-spacing: 0; text-transform: none; }
/* puntito que late mientras piensa o escribe */
html.f26c .f26-bot__status.is-busy::before {
    content: "";
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--f26-gold);
    animation: f26BotDotFade 1s ease-in-out infinite;
}

/* bocadillo de pensamiento junto a la cara de la cabecera */
html.f26c .f26-bot__thought {
    position: absolute;
    top: -5px;
    left: 34px;
    z-index: 1;
    display: flex;
    gap: 3px;
    align-items: center;
    padding: 4px 6px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
    animation: f26BotFade .2s ease both;
}
html.f26c .f26-bot__thought::before,
html.f26c .f26-bot__thought::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: #fff;
}
html.f26c .f26-bot__thought::before { left: -3px; bottom: -4px; width: 6px; height: 6px; }
html.f26c .f26-bot__thought::after { left: -7px; bottom: -8px; width: 3px; height: 3px; }
html.f26c .f26-bot__thought i { width: 4px; height: 4px; border-radius: 50%; background: var(--f26-ink); animation: var(--bt-dots, none) 1.2s ease-in-out infinite; }
html.f26c .f26-bot__thought i:nth-child(2) { animation-delay: .18s; }
html.f26c .f26-bot__thought i:nth-child(3) { animation-delay: .36s; }

html.f26c .f26-bot__close {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
}
html.f26c .f26-bot__close:hover { background: var(--f26-red); }

/* conversación */
html.f26c .f26-bot__log {
    position: relative;
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
}
html.f26c .f26-bot__row { display: flex; align-items: flex-end; gap: 8px; max-width: 100%; }
html.f26c .f26-bot__mini { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 50%; background: var(--f26-red-soft); }
html.f26c .f26-bot__bubble-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 auto; align-items: flex-start; }

/* cada respuesta llega con una entrada suave: primero el muñeco, luego el texto y las tarjetas */
html.f26c .f26-bot__row { animation: var(--bt-in, none) .28s ease both; }
html.f26c .f26-bot__mini { animation: var(--bt-pop, none) .35s cubic-bezier(.3, 1.6, .5, 1) both; }
html.f26c .f26-bot__bubble-col > * { animation: var(--bt-in, none) .3s ease both; }
html.f26c .f26-bot__bubble-col > :nth-child(2) { animation-delay: .07s; }
html.f26c .f26-bot__bubble-col > :nth-child(3) { animation-delay: .14s; }
html.f26c .f26-bot__bubble-col > :nth-child(n+4) { animation-delay: .2s; }
html.f26c .f26-bot__msg--user { animation: var(--bt-in, none) .2s ease both; }
@keyframes f26BotPop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
/* en la conversación solo se mueve el muñeco de la última respuesta (y sin balancear la cabeza: es pequeño) */
html.f26c .f26-bot__mini .f26-bot-head { animation: none; }
html.f26c .f26-bot__row:not(.is-latest) .f26-bot__mini * { animation: none !important; }

html.f26c .f26-bot__msg {
    max-width: 100%;
    padding: 9px 12px;
    border-radius: var(--f26-r) var(--f26-r) var(--f26-r) 4px;
    background: var(--f26-surface);
    box-shadow: var(--f26-shadow-1);
    font-size: var(--f26-fs-sm);
    line-height: 1.45;
    color: var(--f26-text);
    overflow-wrap: anywhere;
}
html.f26c .f26-bot__msg strong { font-weight: 700; }
html.f26c .f26-bot__msg--user {
    align-self: flex-end;
    max-width: 82%;
    border-radius: var(--f26-r) var(--f26-r) 4px var(--f26-r);
    background: var(--f26-red);
    color: #fff;
}

/* pensando: bocadillo de pensamiento (redondo, con dos burbujitas hacia Tritón) y puntos que se encienden por turnos;
   escribiendo: bocadillo normal y puntos más vivos */
/* texto solo para el lector de pantalla */
html.f26c .f26-bot__sr {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
html.f26c .f26-bot__typing { position: relative; display: inline-flex; gap: 5px; padding: 12px 14px; transition: border-radius .2s ease; }
html.f26c .f26-bot__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--f26-mute-2); animation: var(--bt-dots, none) 1.2s infinite ease-in-out; }
html.f26c .f26-bot__typing i:nth-child(2) { animation-delay: .18s; }
html.f26c .f26-bot__typing i:nth-child(3) { animation-delay: .36s; }
html.f26c .f26-bot__typing.is-thought { border-radius: 18px; margin-bottom: 8px; }
html.f26c .f26-bot__typing.is-thought::before,
html.f26c .f26-bot__typing.is-thought::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: var(--f26-surface);
    box-shadow: var(--f26-shadow-1);
}
html.f26c .f26-bot__typing.is-thought::before { left: -5px; bottom: -5px; width: 9px; height: 9px; }
html.f26c .f26-bot__typing.is-thought::after { left: -11px; bottom: -10px; width: 5px; height: 5px; }
html.f26c .f26-bot__typing.is-thought i { background: var(--f26-gold-dk); animation-duration: 1.5s; }
html.f26c .f26-bot__typing.is-writing i { animation-duration: .9s; }
@keyframes f26BotDotFade { 0%, 100% { opacity: .3; } 40% { opacity: 1; } }
@keyframes f26BotDotBounce { 0%, 80%, 100% { transform: none; opacity: .45; } 40% { transform: translateY(-4px); opacity: 1; } }

/* tarjetas (campeonatos, podios, horario, deportistas) */
html.f26c .f26-bot__card {
    width: 100%;
    border-radius: var(--f26-r);
    background: var(--f26-surface);
    box-shadow: var(--f26-shadow-1);
    border-left: 4px solid var(--f26-red);
    overflow: hidden;
}
html.f26c .f26-bot__card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 12px 8px; }
html.f26c .f26-bot__card-title { font-size: var(--f26-fs-sm); font-weight: 800; line-height: 1.25; color: var(--f26-text); }
html.f26c .f26-bot__card-sub { margin-top: 3px; font-size: var(--f26-fs-xs); font-weight: 600; color: var(--f26-mute); text-transform: capitalize; }
html.f26c .f26-bot__badge {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: var(--f26-pill);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .05em;
    text-transform: uppercase;
    background: var(--f26-tint-2);
    color: var(--f26-text-2);
    white-space: nowrap;
}
html.f26c .f26-bot__badge--live { background: var(--f26-red); color: #fff; }
html.f26c .f26-bot__badge--next { background: var(--f26-gold-soft); color: #7a5600; }
html.f26c .f26-bot__badge--done { background: var(--f26-tint-2); color: var(--f26-text-2); }

html.f26c .f26-bot__lines { list-style: none; margin: 0; padding: 0 0 4px; }
html.f26c .f26-bot__line {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    border-top: 1px solid var(--f26-line);
    font-size: var(--f26-fs-sm);
}
html.f26c .f26-bot__line:has(> .f26-bot__line-link) { padding: 0; }
html.f26c .f26-bot__line-link {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 12px;
    color: inherit !important;
    text-decoration: none !important;
}
html.f26c .f26-bot__line-link:hover { background: var(--f26-tint); }
html.f26c .f26-bot__line-link::after { content: "\f054"; font: 900 10px/1 "Font Awesome 6 Free"; color: var(--f26-mute-2); }

html.f26c .f26-bot__day {
    padding: 6px 12px 4px;
    border-top: 1px solid var(--f26-line);
    background: var(--f26-tint);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .06em;
    color: var(--f26-mute);
    text-transform: uppercase;
}
html.f26c .f26-bot__rank {
    flex: 0 0 auto;
    min-width: 26px;
    height: 26px;
    padding: 0 5px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--f26-tint-2);
    font-size: 12px;
    font-weight: 800;
    color: var(--f26-text);
    font-variant-numeric: tabular-nums;
}
html.f26c .f26-bot__rank.is-m1 { background: var(--f26-grad-podium-1); color: #fff; }
html.f26c .f26-bot__rank.is-m2 { background: var(--f26-silver); color: var(--f26-ink); }
html.f26c .f26-bot__rank.is-m3 { background: var(--f26-bronze); color: #fff; }
/* sector (natación, T1, ciclismo...) en lugar de puesto: caja oscura como en los gráficos de TV */
html.f26c .f26-bot__rank.is-sector { min-width: 30px; background: var(--f26-ink); color: #fff; font-size: 11px; }
html.f26c .f26-bot__rank.is-sector i { font-size: 13px; color: var(--f26-gold); }
html.f26c .f26-bot__who { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
html.f26c .f26-bot__name { font-weight: 700; color: var(--f26-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.f26c .f26-bot__detail { font-size: var(--f26-fs-xs); color: var(--f26-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html.f26c .f26-bot__value { flex: 0 0 auto; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--f26-text); font-size: 12px; }
html.f26c .f26-bot__value.is-best { padding: 3px 8px; border-radius: var(--f26-pill); background: var(--f26-gold-soft); color: var(--f26-gold-text); }

html.f26c .f26-bot__card-link,
html.f26c .f26-bot__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--f26-red) !important;
    text-decoration: none !important;
}
html.f26c .f26-bot__card-link { padding: 8px 12px 10px; border-top: 1px solid var(--f26-line); width: 100%; }
html.f26c .f26-bot__link { padding: 8px 14px; border-radius: var(--f26-pill); background: var(--f26-surface); box-shadow: var(--f26-shadow-1); }
html.f26c .f26-bot__card-link:hover,
html.f26c .f26-bot__link:hover { color: var(--f26-red-dk) !important; }

/* sugerencias */
html.f26c .f26-bot__chips {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
    padding: 4px 12px 8px;
    overflow-x: auto;
    scrollbar-width: none;
    animation: f26BotFade .25s ease both;
}
html.f26c .f26-bot__chips::-webkit-scrollbar { display: none; }
html.f26c .f26-bot__chip {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1.5px solid var(--f26-red);
    border-radius: var(--f26-pill);
    background: var(--f26-surface);
    color: var(--f26-red);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}
html.f26c .f26-bot__chip:hover { background: var(--f26-red); color: #fff; }

/* caja de texto */
html.f26c .f26-bot__form {
    display: flex;
    gap: 8px;
    flex: 0 0 auto;
    padding: 10px 12px 12px;
    background: var(--f26-surface);
    border-top: 1px solid var(--f26-line);
}
html.f26c .f26-bot__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1.5px solid var(--f26-line);
    border-radius: var(--f26-pill);
    background: var(--f26-tint);
    color: var(--f26-text);
    font: 500 16px/1 var(--f26-font); /* 16px: así el iPhone no hace zoom al escribir */
    outline: none;
}
html.f26c .f26-bot__input:focus { border-color: var(--f26-gold); background: #fff; box-shadow: var(--f26-focus); }
html.f26c .f26-bot__send {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: var(--f26-red);
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}
html.f26c .f26-bot__send:disabled { background: var(--f26-tint-2); color: var(--f26-mute-2); cursor: default; }

/* ---------- móvil: botón sobre la barra inferior y panel como hoja ---------- */
@media (max-width: 767.98px) {
    html.f26c .f26-bot__launcher {
        right: 12px;
        bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 12px);
        width: 52px;
        height: 52px;
    }
    html.f26c .scroll-to-top { bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 76px) !important; right: 18px !important; }
    html.f26c .return-to-schedule-btn { right: 18px; bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 128px); }
    /* el aviso cabe a lo ancho sin cortarse (también a 320 px) y su X es un objetivo táctil de 44 px */
    html.f26c .f26-bot__teaser {
        right: 76px;
        bottom: calc(var(--f26-bottomnav-h) + env(safe-area-inset-bottom, 0px) + 14px);
        max-width: min(272px, calc(100vw - 92px));
        padding: 0;
    }
    html.f26c .f26-bot__teaser::after { bottom: 18px; }
    html.f26c .f26-bot__teaser-txt { padding: 10px 2px 10px 14px; }
    html.f26c .f26-bot__teaser-x { width: 44px; height: 44px; border-radius: var(--f26-r); }

    html.f26c .f26-bot.is-open .f26-bot__launcher { display: none; }
    html.f26c .f26-bot__scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 1061;
        background: rgba(28, 28, 34, .45);
        animation: f26BotFade .2s ease both;
    }
    html.f26c .f26-bot__panel {
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: min(86vh, calc(100vh - var(--f26-topbar-h) - env(safe-area-inset-top, 0px) - 12px));
        height: min(86dvh, calc(100dvh - var(--f26-topbar-h) - env(safe-area-inset-top, 0px) - 12px));
        border-radius: 20px 20px 0 0;
        animation-name: var(--bt-sheet, none);
    }
    html.f26c .f26-bot__form { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
    /* con el chat abierto la página de detrás no se desplaza */
    html.f26c.f26-bot-open body { overflow: hidden; }
}
@keyframes f26BotUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* pestaña oculta: Tritón se queda quieto (no se gasta nada en animar lo que nadie ve) */
html.f26-bot-sleep .f26-bot :is(.f26-bot-avatar *, .f26-bot__launcher, .f26-bot__thought i, .f26-bot__typing i),
html.f26-bot-sleep .f26-bot .f26-bot__launcher::before,
html.f26-bot-sleep .f26-bot .f26-bot__status::before {
    animation-play-state: paused !important;
}

@media print {
    html.f26c .f26-bot { display: none !important; }
}
