.mundial-wrapper {
    width: 100%;
    position: relative;
    font-family: "Encode Sans", sans-serif;
    margin:30px 0px
}

.mundial-title {
    font-family: "Encode Sans", sans-serif;
    text-align: left;
    color: #000;
    font-size: 22px;
    font-weight: 700;
    line-height: 25px;
    margin: 0 0 10px;
}

.mundial-subtitle {
    font-family: "Encode Sans", sans-serif;
    text-align: left;
    color: #181818;
    font-size: 14px;
    line-height: 20px;
    margin: 0 0 15px;
}

.mundial-source {
    font-family: "Encode Sans", sans-serif;
    text-align: left;
    color: #4a4a4a;
    font-size: 12px;
    line-height: 14px;
    margin: 15px 0 30px;
}

/* ─────────────── MAPA ─────────────── */
.mundial-map-container { position: relative; width: 100%; z-index: 1; }
#mapa-mundial { width: 100%; background-color: white; border-radius: 5px; }

#tooltip-mundial {
    position: absolute; z-index: 10; visibility: hidden;
    color: #000; padding: 8px; background-color: #fff; border-radius: 0;
    font-size: 12px; pointer-events: none; font-family: "Encode Sans", sans-serif;
    box-shadow: 0 2px 2px 0 #ccc; border: 1px solid #ccc; line-height: 1.5; max-width: 250px;
}
#tooltip-mundial .tt-title { display: block; text-align: left; margin: 0 0 5px;
    font-size: 16px; font-weight: 700; border-bottom: 1px solid #c5c5c5; padding-bottom: 3px; }
#tooltip-mundial .tt-meta { font-size: 12px; color: #4a4a4a; margin: 0 0 6px; }
#tooltip-mundial table { border-collapse: collapse; width: 100%; font-size: 12px; }
#tooltip-mundial td { padding: 1px 0; vertical-align: top; }
#tooltip-mundial .tt-label { color: #666; padding-right: 12px; white-space: nowrap; text-align: left; }
#tooltip-mundial .tt-value { color: #000; font-weight: 600; text-align: right; }
#tooltip-mundial .tt-flag { height: 11px; width: auto; vertical-align: -1px; margin-right: 5px; border: 0.5px solid #ddd; }

/* ─────────────── GRÁFICO 1: CAJAS NACIDOS FUERA ─────────────── */
.cajas-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-start;
    text-align: left;
}
.caja {
    /* ancho responsive por columnas: calc((100% - huecos) / nº columnas).
       gap = 14px. Móvil: 2 col · ≥643px: 4 col · ≥900px: 6 col */
    flex: 0 0 calc((100% - 14px) / 2);
    border: 1px solid #e2e2e2;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
@media (min-width: 643px) { .caja { flex-basis: calc((100% - 2 * 14px) / 3); } }
@media (min-width: 900px) { .caja { flex-basis: calc((100% - 4 * 14px) / 5); } }
.caja-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: #f4f4f4;
    border-bottom: 1px solid #e2e2e2;
}
.caja-header img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; border: 1px solid #bbb; flex: 0 0 auto; }
.caja-header .caja-sel { font-weight: 700; font-size: 13px; color: #000; flex: 1; line-height: 1.2; }
.caja-header .caja-num { font-weight: 700; font-size: 15px; color: #c0392b; }
.caja-jugador {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    padding: 5px 10px;
    font-size: 12px;
    border-top: 1px solid #f2f2f2;
}
.caja-jugador img { width: 15px; height: 11px; object-fit: cover; border: 0.5px solid #ddd; flex: 0 0 auto; margin-top: 3px; }
.caja-jugador .cj-texto { flex: 1; line-height: 1.3; }
.caja-jugador .cj-nombre { color: #000; font-weight: 600; }
.caja-jugador .cj-pais { color: #777; white-space: nowrap; }

/* ─────────────── GRÁFICO 2: BUSCADOR SELECCIONES ─────────────── */
.buscador-mundial { width: 100%; }
.buscador-mundial .search-box {
    width: 100%; padding: 9px 12px; font-size: 14px; font-family: "Encode Sans", sans-serif;
    border: 1px solid #ccc; border-radius: 4px; margin-bottom: 12px;
}
.tabla-sel { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: fixed; }
.tabla-sel .fila-sel { border-bottom: 1px solid #eee; cursor: pointer; }
.tabla-sel .fila-sel:hover { background: #fafafa; }
.tabla-sel td { padding: 8px 6px !important; vertical-align: middle; }
.tabla-sel .col-sel-td { width: 175px; }
.tabla-sel .col-sel { display: flex; align-items: center; gap: 8px; }
/* el CMS inyecta `.row div[class^=col-]{padding:10px 0}` y col-sel es un <div>;
   el prefijo .mundial-wrapper sube la especificidad a (0,3,0) y gana sin !important */
.mundial-wrapper .tabla-sel .col-sel { padding-top: 0; padding-bottom: 0; }
.tabla-sel .col-sel span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabla-sel .col-sel img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; border: 1px solid #bbb; }
.tabla-sel .col-sel span { font-weight: 600; color: #000; }
.tabla-sel .col-barra { width: auto; }
.barra-track { background: #eee; border-radius: 3px; height: 16px; position: relative; }
.barra-fill { background: #c0392b; height: 16px; border-radius: 3px; }
.barra-label { font-size: 11px; color: #333; margin-left: 6px; white-space: nowrap; }
.tabla-sel .col-mas { width: 44px; text-align: right; }
.mas-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border: 1px solid #ccc; border-radius: 4px;
    font-weight: 700; color: #555; background: #fff; cursor: pointer; font-size: 15px;
}
.fila-detalle td { background: #fafafa; padding: 10px 12px; }
.detalle-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.detalle-bloque { flex: 1 1 240px; }
.detalle-bloque h5 { margin: 0 0 6px; font-size: 12px; color: #666; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; }
.detalle-item { display: flex; align-items: center; gap: 7px; font-size: 12px; padding: 2px 0; }
.detalle-item img { width: 16px; height: 12px; object-fit: cover; border: 0.5px solid #ddd; }
.detalle-item .di-pais { color: #000; }
.detalle-item .di-num { font-weight: 700; color: #c0392b; min-width: 18px; text-align: right; }
.detalle-vacio { font-size: 12px; color: #999; font-style: italic; }
