/* Resultados de carrera: [fitzroy_resultados] */
.ufr-res {
    --ufr-azul: #161c3e;
    --ufr-naranja: #fd7014;
    --ufr-texto: #23283f;
    --ufr-suave: #6b7085;
    --ufr-linea: #e6e8ef;
    --ufr-fondo: #f6f7fa;
    color: var(--ufr-texto);
    font-family: "Roboto", sans-serif;
    font-size: 15px;
    line-height: 1.4;
}
.ufr-res [hidden] { display: none !important; }

/* Pestañas de distancia */
.ufr-res .ufr-res__tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 20px;
}
.ufr-res .ufr-res__tab,
.ufr-res .ufr-res__tab:focus {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 8px 10px;
    border: 2px solid var(--ufr-azul);
    border-radius: 10px;
    background: #fff;
    color: var(--ufr-azul);
    text-decoration: none;
    transition: background-color .15s, color .15s, border-color .15s;
}
.ufr-res .ufr-res__tab:hover { border-color: var(--ufr-naranja); color: var(--ufr-azul); }
.ufr-res .ufr-res__tab.is-activa {
    background: var(--ufr-naranja);
    border-color: var(--ufr-naranja);
    color: #fff;
}
.ufr-res .ufr-res__tab.is-sin { opacity: .4; }
.ufr-res .ufr-res__tab:focus-visible { outline: 3px solid rgba(253, 112, 20, .35); outline-offset: 2px; }
.ufr-res__tab-nombre {
    font-family: "Josefin Sans", sans-serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1;
    padding-top: 3px;
}
.ufr-res__tab-cant { font-size: 12px; opacity: .8; }
.ufr-res--buscando .ufr-res__tab-cant::after { content: " encontrados"; }

/* Filtros */
.ufr-res .ufr-res__filtros {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    padding: 18px;
    border-radius: 12px;
    background: var(--ufr-azul);
}
.ufr-res .ufr-res__campo { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.ufr-res .ufr-res__campo > span {
    color: var(--ufr-naranja);
    font-family: "Josefin Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ufr-res .ufr-res__campo input,
.ufr-res .ufr-res__campo select {
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background-color: #fff;
    color: var(--ufr-texto);
    font: 400 15px/1.2 "Roboto", sans-serif;
    box-shadow: none;
}
.ufr-res .ufr-res__campo select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23161c3e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    cursor: pointer;
}
.ufr-res .ufr-res__campo select:disabled { opacity: .5; cursor: not-allowed; }

/* Desplegable propio (reemplaza la lista nativa del select) */
.ufr-res .ufr-res__campo select.ufr-dd__nativo { position: absolute; width: 1px !important; height: 1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); opacity: 0; pointer-events: none; }
.ufr-res .ufr-res__campo { position: relative; }
.ufr-res .ufr-dd { position: relative; }
.ufr-res .ufr-dd__btn,
.ufr-res .ufr-dd__btn:hover,
.ufr-res .ufr-dd__btn:focus,
.ufr-res .ufr-dd__btn:active {
    display: flex;
    align-items: center;
    width: 100%;
    height: 46px;
    margin: 0;
    padding: 0 40px 0 14px;
    border: 0;
    border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23161c3e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 16px !important;
    box-shadow: none;
    color: var(--ufr-texto) !important;
    font: 400 15px/1.2 "Roboto", sans-serif !important;
    letter-spacing: 0 !important;
    text-align: left;
    text-transform: none !important;
    cursor: pointer;
}
.ufr-res .ufr-dd__btn:focus { outline: none; }
.ufr-res .ufr-dd__btn:focus-visible,
.ufr-res .ufr-dd.is-abierto .ufr-dd__btn { outline: 3px solid var(--ufr-naranja); outline-offset: 0; }
.ufr-res .ufr-dd.is-abierto .ufr-dd__btn { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 15 6-6 6 6' fill='none' stroke='%23161c3e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; }
.ufr-res .ufr-dd__btn:disabled { opacity: .5; cursor: not-allowed; }
.ufr-res .ufr-dd__valor { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ufr-res .ufr-dd__lista {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    max-height: 360px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(22, 28, 62, .22), 0 0 0 1px rgba(22, 28, 62, .08);
    list-style: none;
    outline: none;
}
.ufr-res .ufr-dd__lista li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 7px;
    color: var(--ufr-texto);
    font: 400 15px/1.25 "Roboto", sans-serif;
    cursor: pointer;
}
.ufr-res .ufr-dd__lista li.is-foco { background: #fff1e6; }
.ufr-res .ufr-dd__lista li[aria-selected="true"] { color: var(--ufr-naranja); font-weight: 600; }
.ufr-res .ufr-dd__lista li[aria-selected="true"]::after {
    content: "";
    flex: 0 0 16px;
    height: 16px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 5 5 9-10' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m5 12 5 5 9-10' fill='none' stroke='%23000' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ufr-res .ufr-res__campo input:focus,
.ufr-res .ufr-res__campo select:focus { outline: 3px solid var(--ufr-naranja); outline-offset: 0; }

.ufr-res .ufr-res__estado { margin: 14px 2px 6px; color: var(--ufr-suave); font-size: 14px; }
.ufr-res .ufr-res__estado:empty { margin: 0; }
.ufr-res .ufr-res__vacio { margin: 24px 0; padding: 28px; border-radius: 12px; background: var(--ufr-fondo); text-align: center; }
.ufr-res .ufr-res__fuente { margin: 28px 0 0; color: var(--ufr-suave); font-size: 13px; }
.ufr-res .ufr-res__fuente a { color: var(--ufr-azul); text-decoration: underline; }

/* Distancia */
.ufr-res .ufr-res__panel { margin: 0 0 40px; scroll-margin-top: 120px; }
.ufr-res .ufr-res__titulo {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 18px 0 6px;
    color: var(--ufr-azul);
    font-family: "Sunday", sans-serif;
    font-size: 40px;
    font-weight: 400;
    line-height: 1.1;
}
.ufr-res .ufr-res__titulo span { color: var(--ufr-suave); font-family: "Roboto", sans-serif; font-size: 14px; }
.ufr-res .ufr-res__nota { margin: 0 0 12px; color: var(--ufr-suave); font-size: 13px; }

/* Tabla */
.ufr-res .ufr-res__tabla {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: collapse;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}
.ufr-res .ufr-res__tabla th,
.ufr-res .ufr-res__tabla td {
    padding: 11px 10px;
    border: 0;
    border-bottom: 1px solid var(--ufr-linea);
    background: transparent;
    line-height: 1.35;
    text-align: left;
    vertical-align: middle;
}
.ufr-res .ufr-res__tabla thead th {
    padding-top: 6px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--ufr-azul);
    color: var(--ufr-suave);
    font-family: "Josefin Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.ufr-res .ufr-res__tabla abbr { text-decoration: none; cursor: help; }
.ufr-res .ufr-res__tabla .ufr-res__grupo th {
    padding: 9px 12px 7px;
    border: 0;
    background: var(--ufr-azul);
    color: #fff;
    font-family: "Josefin Sans", sans-serif;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.ufr-res .ufr-res__tabla .ufr-res__grupo span { margin-left: 6px; color: var(--ufr-naranja); }
.ufr-res .ufr-res__tabla tbody tr[data-q]:hover > td { background: #fff6ef; }

.ufr-res .ufr-pos, .ufr-res .ufr-pc { width: 56px; text-align: center !important; }
.ufr-res .ufr-dor { width: 76px; color: var(--ufr-suave); }
.ufr-res td.ufr-nom { font-weight: 500; }
.ufr-res .ufr-cat { width: 150px; white-space: nowrap; }
.ufr-res .ufr-pais { width: 130px; color: var(--ufr-suave); }
.ufr-res .ufr-tie { width: 96px; font-weight: 600; text-align: right !important; white-space: nowrap; }
.ufr-res .ufr-cert { width: 52px; text-align: center !important; }
.ufr-res .ufr-pc { color: var(--ufr-suave); }
.ufr-res .ufr-meta { display: none; }
.ufr-res .ufr-extra { display: block; margin-top: 2px; color: var(--ufr-suave); font-size: 13px; font-weight: 400; }
.ufr-res .ufr-fuera > td { color: var(--ufr-suave); }
.ufr-res .ufr-fuera td.ufr-nom { font-weight: 400; }
.ufr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.ufr-res .ufr-p { display: inline-grid; place-items: center; min-width: 30px; height: 30px; font-weight: 700; }
.ufr-res .ufr-p--1, .ufr-res .ufr-p--2, .ufr-res .ufr-p--3 { border-radius: 50%; color: #fff; }
.ufr-res .ufr-p--1 { background: #d9a520; }
.ufr-res .ufr-p--2 { background: #9aa1ad; }
.ufr-res .ufr-p--3 { background: #b9773e; }
.ufr-res .ufr-sin {
    display: inline-block;
    padding: 3px 6px 2px;
    border-radius: 5px;
    background: var(--ufr-fondo);
    color: var(--ufr-suave);
    font: 600 11px/1.2 "Josefin Sans", sans-serif;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: help;
}

.ufr-res .ufr-cert a,
.ufr-res .ufr-cert a:focus {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--ufr-fondo);
    color: var(--ufr-azul);
    text-decoration: none;
    transition: background-color .15s, color .15s;
}
.ufr-res .ufr-cert a:hover { background: var(--ufr-naranja); color: #fff; }
.ufr-res .ufr-cert a.ufr-ext::before {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 5h5v5'/%3E%3Cpath d='M19 5l-8 8'/%3E%3Cpath d='M17 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h4'/%3E%3C/g%3E%3C/svg%3E") !important;
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 5h5v5'/%3E%3Cpath d='M19 5l-8 8'/%3E%3Cpath d='M17 14v4a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h4'/%3E%3C/g%3E%3C/svg%3E") !important;
}
.ufr-res .ufr-cert a::before {
    content: "";
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 20h14'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3Cpath d='M5 20h14'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

@media (max-width: 1024px) {
    .ufr-res .ufr-pais { display: none; }
    .ufr-res .ufr-res__tabla th,
    .ufr-res .ufr-res__tabla td { padding-left: 6px; padding-right: 6px; }
    .ufr-res .ufr-pos, .ufr-res .ufr-pc { width: 44px; }
    .ufr-res .ufr-dor { width: 60px; }
    .ufr-res .ufr-cat { width: 118px; }
}

@media (max-width: 767px) {
    .ufr-res .ufr-res__tabs { gap: 6px; }
    .ufr-res .ufr-res__tab, .ufr-res .ufr-res__tab:focus { padding: 10px 2px 8px; border-radius: 8px; }
    .ufr-res__tab-nombre { font-size: 17px; }
    .ufr-res__tab-cant { font-size: 11px; }
    .ufr-res--buscando .ufr-res__tab-cant::after { content: none; }
    .ufr-res .ufr-res__filtros { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 14px; gap: 12px; }
    .ufr-res .ufr-res__campo--buscar { grid-column: 1 / -1; }
    .ufr-res .ufr-res__titulo { font-size: 32px; }

    .ufr-res .ufr-res__tabla,
    .ufr-res .ufr-res__tabla tbody { display: block; }
    .ufr-res .ufr-res__tabla thead { display: none; }
    .ufr-res .ufr-res__tabla .ufr-res__grupo { display: block; }
    .ufr-res .ufr-res__tabla .ufr-res__grupo th { display: block; }
    .ufr-res .ufr-res__tabla tr[data-q] {
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) auto;
        grid-template-areas: "pos nom tie" "pos nom cert";
        column-gap: 12px;
        align-items: center;
        padding: 10px 4px;
        border-bottom: 1px solid var(--ufr-linea);
    }
    .ufr-res .ufr-res__tabla tr[data-q] > td { width: auto; padding: 0; border: 0; }
    .ufr-res .ufr-res__tabla .ufr-pc,
    .ufr-res .ufr-res__tabla .ufr-dor,
    .ufr-res .ufr-res__tabla .ufr-cat { display: none; }
    .ufr-res .ufr-res__tabla td.ufr-pos { grid-area: pos; }
    .ufr-res .ufr-res__tabla td.ufr-nom { grid-area: nom; }
    .ufr-res .ufr-res__tabla td.ufr-tie { grid-area: tie; align-self: end; }
    .ufr-res .ufr-res__tabla td.ufr-cert { grid-area: cert; justify-self: end; align-self: start; }
    .ufr-res .ufr-meta { display: block; margin-top: 2px; color: var(--ufr-suave); font-size: 13px; font-weight: 400; }
    .ufr-res .ufr-extra { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .ufr-res .ufr-p { min-width: 28px; height: 28px; font-size: 14px; }
    .ufr-res .ufr-cert a, .ufr-res .ufr-cert a:focus { width: 32px; height: 32px; background: transparent; }
}

.ufr-res--sin-enlaces .ufr-cert { display: none !important; }
