/* =====================================================================================================
   Rediseño 2026 (FETRI): diálogo «Imagen para redes» (js/f26-share.js), botones que lo abren y barra de
   progreso de la biografía (Components/F26/F26LoadBar.razor).
   El diálogo cuelga de <body>: sus reglas van bajo html.f26 (no dependen del envoltorio de la página).
   ===================================================================================================== */

/* ---------- Barra de progreso ---------- */
html.f26c .f26-loadbar { display: flex; flex-direction: column; gap: 8px; margin-top: auto; padding-top: 14px; }
html.f26c .f26-loadbar-track { position: relative; height: 8px; overflow: hidden; border-radius: 4px; background: var(--f26-tint-2); }
html.f26c .f26-loadbar-fill {
    position: relative;
    display: block;
    height: 100%;
    overflow: hidden;
    border-radius: 4px;
    background: var(--f26-grad-accent);
    transition: width .25s ease;
}
html.f26c .f26-loadbar-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .55) 50%, rgba(255, 255, 255, 0) 70%);
    animation: f26-loadbar-shine 1.3s linear infinite;
}
@keyframes f26-loadbar-shine {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}
html.f26c .f26-loadbar-label { color: var(--f26-mute); font-family: var(--f26-font); font-size: 12px; font-weight: 800; }
html.f26c .f26-loadbar--panel { padding: 18px 2px 6px; }

/* Filas de relleno mientras llegan los resultados («Últimos 10 eventos») */
html.f26c .f26-athp .ath-ev--loading { display: flex; flex-direction: column; }
html.f26c .f26-athp .ath-ev-row--ghost .ath-ev-pos { color: transparent; }
html.f26c .f26-athp .ath-ev-row--ghost .ath-ev-id { display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; }
html.f26c .f26-athp .ath-ev-row--ghost .ath-ev-name,
html.f26c .f26-athp .ath-ev-row--ghost .ath-ev-meta {
    height: 10px;
    border-radius: 5px;
    background: var(--f26-tint);
    animation: f26-sk-pulse 1.6s ease-in-out infinite alternate;
}
html.f26c .f26-athp .ath-ev-row--ghost .ath-ev-name { width: 62%; height: 12px; }
html.f26c .f26-athp .ath-ev-row--ghost .ath-ev-meta { width: 38%; }
html.f26c .f26-athp .ath-ev-row--ghost:nth-child(2) .ath-ev-name { width: 48%; }
html.f26c .f26-athp .ath-ev-row--ghost:nth-child(3) .ath-ev-name { width: 70%; }

/* ---------- Botones que abren el diálogo ---------- */
html.f26c .f26-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}
html.f26c .f26-athp .ath-profile-share {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: var(--f26-gold);
    font-size: 15px;
    cursor: pointer;
    transition: background .15s ease;
}
html.f26c .f26-athp .ath-profile-share:hover { background: rgba(255, 255, 255, .16); }
html.f26c .f26-athp .ath-profile-share:focus-visible { outline: 3px solid var(--f26-gold); outline-offset: 2px; }
html.f26c .f26-athp .ath-profile-actions { display: inline-flex; flex: none; align-items: center; gap: 8px; }

/* ---------- Diálogo ---------- */
html.f26-share-open, html.f26-share-open body { overflow: hidden; }
html.f26 .f26-share {
    position: fixed;
    inset: 0;
    z-index: 100000000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(12, 12, 16, .72);
    font-family: var(--f26-font);
    animation: f26-share-in .18s ease-out;
}
@keyframes f26-share-in {
    from { opacity: 0; }
    to { opacity: 1; }
}
html.f26 .f26-share__box {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: min(560px, 100%);
    max-height: 100%;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
}
html.f26 .f26-share__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
html.f26 .f26-share__title { margin: 0; color: var(--f26-ink); font-size: 18px; font-weight: 900; letter-spacing: .02em; text-transform: uppercase; }
html.f26 .f26-share__sub { margin: 4px 0 0; color: var(--f26-mute); font-size: 12.5px; font-weight: 600; }
html.f26 .f26-share__x {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--f26-line);
    border-radius: 50%;
    background: #fff;
    color: var(--f26-ink);
    font-size: 16px;
    cursor: pointer;
}
html.f26 .f26-share__x:hover { border-color: var(--f26-ink); }
html.f26 .f26-share__fmts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; border-radius: var(--f26-pill); background: var(--f26-tint); }
html.f26 .f26-share__fmt {
    display: inline-flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    height: 36px;
    padding: 0 8px;
    border: 0;
    border-radius: var(--f26-pill);
    background: transparent;
    color: var(--f26-text-2);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 36px;
    cursor: pointer;
}
html.f26 .f26-share__fmt small { color: var(--f26-mute); font-size: 10.5px; font-weight: 800; }
html.f26 .f26-share__fmt[aria-checked="true"] { background: var(--f26-ink); color: #fff; }
html.f26 .f26-share__fmt[aria-checked="true"] small { color: var(--f26-gold); }
html.f26 .f26-share__fmt:focus-visible,
html.f26 .f26-share__btn:focus-visible,
html.f26 .f26-share__x:focus-visible { outline: 3px solid var(--f26-gold); outline-offset: 2px; }
html.f26 .f26-share__stage {
    position: relative;
    align-self: center;
    width: auto;
    height: min(56vh, 560px);
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    background: var(--f26-ink);
}
html.f26 .f26-share__img { display: block; width: 100%; height: 100%; object-fit: contain; }
html.f26 .f26-share__wait {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(28, 28, 34, .6);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}
html.f26 .f26-share__stage.is-busy .f26-share__wait { display: flex; }
html.f26 .f26-share__actions { display: flex; justify-content: flex-end; gap: 8px; }
html.f26 .f26-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 1px solid var(--f26-line);
    border-radius: var(--f26-pill);
    background: #fff;
    color: var(--f26-ink);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 800;
    cursor: pointer;
}
html.f26 .f26-share__btn--main { border-color: var(--f26-ink); background: var(--f26-ink); color: #fff; }
html.f26 .f26-share__btn--main i { color: var(--f26-gold); }
html.f26 .f26-share__btn:disabled { opacity: .5; cursor: default; }
html.f26 .f26-share__btn[hidden] { display: none; }

/* Los 10 primeros del ranking: el texto para WhatsApp, Telegram, X, Facebook o copiarlo */
html.f26 .f26-share__links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--f26-line);
}
html.f26 .f26-share__links-k {
    width: 100%;
    color: var(--f26-mute, #6b6f7a);
    font-size: 11.5px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}
html.f26 .f26-share__net {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--f26-line);
    border-radius: var(--f26-pill);
    background: #fff;
    color: var(--f26-ink);
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
html.f26 .f26-share__net:hover { border-color: var(--f26-ink); color: var(--f26-ink); }
html.f26 .f26-share__net:focus-visible { outline: 3px solid var(--f26-gold); outline-offset: 2px; }
html.f26 .f26-share__net i { font-size: 15px; }
html.f26 .f26-share__net--wa i { color: #1FA855; }
html.f26 .f26-share__net--tg i { color: #229ED9; }
html.f26 .f26-share__net--fb i { color: #1877F2; }
html.f26 .f26-share__net--copy i { color: var(--f26-red); }
@media (max-width: 575.98px) {
    html.f26 .f26-share__links { gap: 6px; }
    html.f26 .f26-share__net { flex: 1 1 calc(33% - 6px); justify-content: center; padding: 0 8px; }
}

@media (max-width: 575.98px) {
    html.f26 .f26-share { align-items: flex-end; padding: 0; }
    html.f26 .f26-share__box { width: 100%; padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
    html.f26 .f26-share__stage { height: min(52vh, 480px); }
    html.f26 .f26-share__actions .f26-share__btn { flex: 1 1 0; }
}

@media (prefers-reduced-motion: reduce) {
    html.f26c .f26-loadbar-fill { transition: none; }
    html.f26c .f26-loadbar-fill::after { animation: none; }
    html.f26 .f26-share { animation: none; }
}

/* Ficha en escritorio: con los dos botones (imagen y PDF) el club ya no cabe en la línea de los datos; va en la suya
   (sigue recortándose con «…» si es muy largo) */
@media (min-width: 992px) {
    html.f26c .f26-athp .ath-profile-header-id .ath-meta { flex-wrap: wrap; row-gap: 2px; }
    html.f26c .f26-athp .ath-profile-header-id .ath-meta > .ath-meta-sep:has(+ .ath-meta-club) { display: none; }
    html.f26c .f26-athp .ath-profile-header-id .ath-meta > .ath-meta-club { flex-basis: 100%; }
}

/* Ficha con foto (móvil y tablet): «Descargar PDF» e «Imagen para redes» en una fila, mitad y mitad */
html.f26c .f26-athp .ath-pdf-row { display: flex; align-self: stretch; gap: 8px; width: 100%; margin-top: 12px; }
html.f26c .f26-athp .ath-pdf-row .ath-pdf { flex: 1 1 0; width: auto; min-width: 0; margin-top: 0; padding: 0 10px; }
html.f26c .f26-athp .ath-share:disabled,
html.f26c .f26-athp .ath-profile-share:disabled { opacity: .5; cursor: progress; }
@media (max-width: 359.98px) {
    html.f26c .f26-athp .ath-pdf-row .ath-pdf { gap: 6px; padding: 0 6px; font-size: 11px; }
}

/* El botón «Histórico» de los rankings llega con su histórico (después de la ficha): la fila ya le guarda el alto */
html.f26c .f26-athp .ath-ranks-title { min-height: 32px; }

/* Vídeo para redes de las animaciones (js/f26-video.js, MAP 24-11): mientras se genera se ve el lienzo con una barra
   de avance; después, el vídeo con sus controles */
html.f26 .f26-vid__live,
html.f26 .f26-vid__video { position: absolute; inset: 0; width: 100%; height: 100%; }
html.f26 .f26-vid__live > canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
html.f26 .f26-vid__video { background: var(--f26-ink); object-fit: contain; }
html.f26 .f26-vid__live[hidden],
html.f26 .f26-vid__video[hidden] { display: none; }
html.f26 .f26-vid__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(255, 255, 255, .15); opacity: 0; }
html.f26 .f26-vid__bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--f26-gold), #E8702A, var(--f26-red)); }
html.f26 .f26-vid__msg { position: absolute; left: 50%; bottom: 16px; padding: 6px 12px; border-radius: var(--f26-pill); background: rgba(28, 28, 34, .82); color: #fff; font-size: 12px; font-weight: 800; white-space: nowrap; transform: translateX(-50%); }
html.f26 .f26-vid__msg:empty { display: none; }
html.f26 .f26-vid__stage.is-rec .f26-vid__bar { opacity: 1; }
html.f26 .f26-vid__note { margin: 0; color: var(--f26-mute); font-size: 12px; font-weight: 600; text-align: center; }
