/* LPF Predicciones — usa las variables del tema lpf-child si existen. */
.lpfp{
	--lpfp-lime: var(--lpf-lime, #A6CE39);
	--lpfp-lime-text: var(--lpf-lime-text, #587414);
	--lpfp-ink: var(--lpf-ink, #111214);
	--lpfp-dark: var(--lpf-charcoal, #171717);
	--lpfp-muted: var(--lpf-ink-muted, #65686B);
	--lpfp-border: var(--lpf-border, #E7E8E3);
	--lpfp-soft: var(--lpf-gray-light, #F3F4F1);
	--lpfp-r: var(--lpf-radius-card, 14px);
	color: var(--lpfp-ink);
	font-size: 15px;
	font-variant-numeric: tabular-nums;
}
.lpfp *, .lpfp *::before, .lpfp *::after{ box-sizing: border-box; }
.lpfp p{ margin: 0; }
.lpfp h2{ font-size: clamp(20px, 2.4vw, 26px); margin: 0 0 14px; letter-spacing: -.01em; }
.lpfp h3{ font-size: 16px; margin: 0 0 10px; }

/* Piezas comunes */
.lpfp-chip{ display: inline-flex; align-items: center; gap: 6px; background: var(--lpfp-lime); color: #111; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.lpfp-chip::before{ content: ""; width: 6px; height: 6px; border-radius: 50%; background: #111; animation: lpfp-pulso 1.6s ease-in-out infinite; }
@keyframes lpfp-pulso{ 50%{ opacity: .25; } }
@media (prefers-reduced-motion: reduce){ .lpfp-chip::before{ animation: none; } }
.lpfp-label{ font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--lpfp-muted); margin: 16px 0 8px !important; }
.lpfp-team{ display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.lpfp-team > span:last-child{ overflow: hidden; text-overflow: ellipsis; }
.lpfp-escudo{ flex: none; object-fit: contain; }
.lpfp-escudo--ini{ display: inline-grid; place-items: center; border-radius: 50%; background: var(--lpfp-soft); border: 1px solid var(--lpfp-border); font-size: 10px; font-weight: 800; color: var(--lpfp-muted); }
.lpfp-cta{ display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 16px; padding: 11px 16px; border-radius: 999px; background: var(--lpfp-dark); color: #fff !important; font-weight: 700; font-size: 14px; text-decoration: none !important; transition: background .2s, transform .2s; }
.lpfp-cta::after{ content: "→"; transition: transform .2s; }
.lpfp-cta:hover{ background: #000; }
.lpfp-cta:hover::after{ transform: translateX(3px); }
.lpfp-nota, .lpfp-ayuda{ color: var(--lpfp-muted); font-size: 13px; line-height: 1.5; }
.lpfp-nota{ margin-top: 28px !important; padding-top: 16px; border-top: 1px solid var(--lpfp-border); }
.lpfp-ayuda{ margin-top: 10px !important; }

/* Tarjeta */
.lpfp-card{ background: #fff; border: 1px solid var(--lpfp-border); border-radius: var(--lpfp-r); overflow: hidden; box-shadow: 0 2px 10px rgba(3,3,3,.05); display: flex; flex-direction: column; }
.lpfp-card__head{ display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 16px 18px; background: var(--lpfp-dark); color: #fff; background-image: radial-gradient(120% 140% at 100% 0%, rgba(166,206,57,.28) 0%, transparent 55%); }
.lpfp-card__torneo{ font-size: 18px; font-weight: 800; margin-bottom: 6px !important; }
.lpfp-card__upd{ font-size: 11px; color: rgba(255,255,255,.65); text-align: right; }
.lpfp-card__body{ padding: 4px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.lpfp-card__body .lpfp-cta{ margin-top: auto; }
.lpfp-card__matches{ display: grid; gap: 10px; margin-bottom: 16px; }
.lpfp-card--plana{ border: 0; box-shadow: none; }

/* Favoritos */
.lpfp-favs{ list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; align-content: start; }
.lpfp-favs__top{ display: flex; justify-content: space-between; align-items: center; gap: 10px; font-weight: 700; }
.lpfp-favs__pct{ font-size: 20px; font-weight: 800; }
.lpfp-favs__bar{ height: 6px; background: var(--lpfp-soft); border-radius: 99px; margin-top: 6px; overflow: hidden; }
.lpfp-favs__bar span{ display: block; height: 100%; background: linear-gradient(90deg, var(--lpfp-lime-text), var(--lpfp-lime)); border-radius: 99px; }
.lpfp-favs__sub{ font-size: 12px; color: var(--lpfp-muted); margin-top: 4px !important; }

/* Partido */
.lpfp-match{ border: 1px solid var(--lpfp-border); border-radius: 12px; padding: 12px 14px; background: #fff; }
.lpfp-match__fecha{ font-size: 12px; color: var(--lpfp-muted); margin-bottom: 8px !important; }
.lpfp-match__fecha::first-letter, .lpfp-dia::first-letter{ text-transform: uppercase; }
.lpfp-match__eq{ display: grid; grid-template-columns: auto 1fr auto 1fr auto; align-items: center; gap: 8px; font-size: 14px; }
.lpfp-match__eq strong:last-of-type{ text-align: right; }
.lpfp-match__vs{ font-size: 11px; color: var(--lpfp-muted); }
.lpfp-bar{ display: flex; gap: 3px; margin-top: 10px; font-size: 12px; font-weight: 700; }
.lpfp-bar span{ flex-basis: 0; min-width: 38px; padding: 5px 0; text-align: center; border-radius: 6px; }
.lpfp-bar__l{ background: var(--lpfp-lime); color: #111; }
.lpfp-bar__e{ background: var(--lpfp-soft); color: #333; }
.lpfp-bar__v{ background: var(--lpfp-dark); color: #fff; }
.lpfp-bar__leyenda{ display: flex; justify-content: space-between; font-size: 10px; color: var(--lpfp-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }

/* Widget del inicio con pestañas (sin JS: radios + labels) */
.lpfp-widget{ background: #fff; border: 1px solid var(--lpfp-border); border-radius: var(--lpfp-r); box-shadow: 0 2px 10px rgba(3,3,3,.05); overflow: hidden; }
.lpfp-widget__head{ display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--lpfp-border); }
.lpfp-widget__title{ margin: 0 !important; font-size: 20px !important; }
.lpfp-widget__title span{ color: var(--lpfp-lime-text); }
.lpfp-tab-input{ position: absolute; opacity: 0; pointer-events: none; }
.lpfp-tabs{ display: flex; gap: 4px; background: var(--lpfp-soft); padding: 4px; border-radius: 999px; }
.lpfp-tab{ cursor: pointer; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--lpfp-muted); transition: background .2s, color .2s; }
.lpfp-panel{ display: none; }
/* :has() y no "~": el shortcode pasa por wpautop, que mete los radios en
   un <p> y rompe el selector de hermanos. */
.lpfp-widget:has(#lpfp-tab-fpc:checked) .lpfp-tab--fpc,
.lpfp-widget:has(#lpfp-tab-laliga:checked) .lpfp-tab--laliga,
.lpfp-widget:has(#lpfp-tab-ucl:checked) .lpfp-tab--ucl,
.lpfp-widget:has(#lpfp-tab-peru:checked) .lpfp-tab--peru{ background: var(--lpfp-dark); color: #fff; }
.lpfp-widget:has(#lpfp-tab-fpc:checked) .lpfp-panel--fpc,
.lpfp-widget:has(#lpfp-tab-laliga:checked) .lpfp-panel--laliga,
.lpfp-widget:has(#lpfp-tab-ucl:checked) .lpfp-panel--ucl,
.lpfp-widget:has(#lpfp-tab-peru:checked) .lpfp-panel--peru{ display: block; }
.lpfp-widget > p:empty{ display: none; }
.lpfp-widget:has(.lpfp-tab-input:focus-visible) .lpfp-tabs{ outline: 2px solid var(--lpfp-lime); outline-offset: 2px; }
/* En el widget la tarjeta va a lo ancho: favoritos y partido lado a lado */
/* En el widget y en las secciones del inicio la tarjeta va a lo ancho:
   favoritos a la izquierda y partidos destacados a la derecha. */
.lpfp-mini{ margin-top: 28px; }
.lpfp-widget, .lpfp-mini{ container-type: inline-size; }
@container (min-width: 720px){
	:is(.lpfp-widget, .lpfp-mini) .lpfp-card__body{ display: grid; grid-template-columns: 1fr 1.25fr; grid-template-rows: auto auto 1fr; column-gap: 28px; }
	:is(.lpfp-widget, .lpfp-mini) .lpfp-card__body > :nth-child(1){ grid-column: 1; grid-row: 1; }
	:is(.lpfp-widget, .lpfp-mini) .lpfp-card__body > :nth-child(2){ grid-column: 1; grid-row: 2 / 4; }
	:is(.lpfp-widget, .lpfp-mini) .lpfp-card__body > :nth-child(3){ grid-column: 2; grid-row: 1; }
	:is(.lpfp-widget, .lpfp-mini) .lpfp-card__body > :nth-child(4){ grid-column: 2; grid-row: 2; }
	:is(.lpfp-widget, .lpfp-mini) .lpfp-card__body > .lpfp-cta{ grid-column: 2; grid-row: 3; align-self: end; }
	:is(.lpfp-widget, .lpfp-mini) .lpfp-card__matches{ grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
}

/* Resumen /predicciones/ */
.lpfp-resumen{ display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 20px; }

/* Página del torneo */
.lpfp-hero{ display: grid; grid-template-columns: 1fr; gap: 20px; background: var(--lpfp-dark); color: #fff; border-radius: var(--lpfp-r); padding: 22px; margin-bottom: 32px; background-image: radial-gradient(90% 120% at 100% 0%, rgba(166,206,57,.25) 0%, transparent 60%); }
.lpfp-hero__meta{ font-size: 13px; color: rgba(255,255,255,.7); margin: 10px 0 14px !important; }
.lpfp-pasos{ list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; counter-reset: paso; }
.lpfp-pasos li{ counter-increment: paso; font-size: 12px; font-weight: 700; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.6); }
.lpfp-pasos li.is-hecho{ color: #fff; border-color: rgba(166,206,57,.6); }
.lpfp-pasos li.is-hecho::before{ content: "✓ "; color: var(--lpfp-lime); }
.lpfp-pasos li.is-actual{ background: var(--lpfp-lime); border-color: var(--lpfp-lime); color: #111; }
.lpfp-kpis{ display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.lpfp-kpi{ background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 14px; }
.lpfp-kpi--fav{ grid-row: span 2; }
.lpfp-kpi__label{ font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: rgba(255,255,255,.65); margin-bottom: 10px !important; }
.lpfp-kpi__valor{ font-size: 34px; font-weight: 800; line-height: 1; color: var(--lpfp-lime); }
.lpfp-kpi__valor small{ font-size: 14px; color: #fff; }
.lpfp-kpi__sub{ font-size: 12px; color: rgba(255,255,255,.65); margin-top: 6px !important; }
.lpfp-hero .lpfp-favs__sub{ color: rgba(255,255,255,.6); }
.lpfp-hero .lpfp-favs__bar{ background: rgba(255,255,255,.12); }
.lpfp-hero .lpfp-escudo--ini{ background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
@media (min-width: 900px){ .lpfp-hero{ grid-template-columns: 1fr 1.6fr; align-items: start; } }
.lpfp-sec{ margin-bottom: 40px; }

/* Tablas */
.lpfp-scroll{ overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--lpfp-border); border-radius: 12px; }
.lpfp-tabla{ width: 100%; border-collapse: collapse; background: #fff; }
.lpfp-tabla th{ position: sticky; top: 0; background: var(--lpfp-soft); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--lpfp-muted); text-align: center; padding: 10px 8px; white-space: nowrap; }
.lpfp-tabla td{ text-align: center; padding: 8px; border-top: 1px solid var(--lpfp-border); white-space: nowrap; font-size: 14px; }
.lpfp-tabla tbody tr:hover td{ background-color: rgba(166,206,57,.06); }
.lpfp-tabla .lpfp-eq{ text-align: left; font-weight: 600; position: sticky; left: 0; background: #fff; z-index: 1; min-width: 150px; }
.lpfp-tabla th.lpfp-eq{ background: var(--lpfp-soft); z-index: 2; }
.lpfp-pos{ color: var(--lpfp-muted); font-weight: 700; }
/* Celda de calor: más verde cuanto más probable */
.lpfp-tabla td.lpfp-heat{ background: rgb(166 206 57 / calc(var(--a) * .85%)); font-weight: 600; min-width: 62px; }
.lpfp-tabla td.lpfp-heat--alto{ color: #1d2a05; font-weight: 800; }
.lpfp-mapa td, .lpfp-mapa th{ padding: 6px 4px; min-width: 30px; font-size: 12px; }
.lpfp-mapa td.lpfp-heat{ min-width: 30px; border-left: 1px solid #fff; }
.lpfp-grupos{ display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.lpfp-grupo{ border: 1px solid var(--lpfp-border); border-radius: 12px; overflow: hidden; }
.lpfp-grupo h3{ padding: 10px 12px; margin: 0; background: var(--lpfp-dark); color: #fff; }

/* Partidos por día */
.lpfp-dia{ font-size: 13px !important; color: var(--lpfp-muted); margin: 18px 0 10px !important; }
.lpfp-matches{ display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }

/* Resultados */
.lpfp-res{ list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 8px; }
.lpfp-res li{ display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--lpfp-border); border-radius: 10px; font-size: 14px; }
.lpfp-res__eq{ display: inline-flex; align-items: center; gap: 6px; }
.lpfp-res__eq--v{ justify-content: flex-end; }
.lpfp-res__score{ font-weight: 800; background: var(--lpfp-soft); padding: 2px 10px; border-radius: 6px; }

@media (max-width: 600px){
	.lpfp{ font-size: 14px; }
	.lpfp-hero{ padding: 16px; }
	.lpfp-tabla .lpfp-eq{ min-width: 120px; }
}

/* Últimas noticias y otras predicciones */
.lpfp-notas{ display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.lpfp-noticia{ display: flex; flex-direction: column; gap: 6px; color: inherit !important; text-decoration: none !important; }
.lpfp-noticia__img{ width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--lpf-radius-image, 10px); }
.lpfp-noticia__fecha{ font-size: 12px; color: var(--lpfp-muted); }
.lpfp-noticia__titulo{ font-size: 16px; line-height: 1.3; }
.lpfp-noticia:hover .lpfp-noticia__titulo{ text-decoration: underline; text-decoration-color: var(--lpfp-lime); }
.lpfp-pagina .lpfp-mas{ margin-top: 12px !important; }
.lpfp-otras ul{ list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lpfp-otras a{ display: inline-block; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--lpfp-border); color: inherit !important; text-decoration: none !important; font-weight: 700; font-size: 14px; }
.lpfp-otras a:hover{ background: var(--lpfp-lime); border-color: var(--lpfp-lime); }

/* Móvil: pestañas en una fila deslizable y tarjeta compacta */
@media (max-width: 600px){
	.lpfp-widget__head{ padding: 12px 14px; }
	.lpfp-tabs{ width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
	.lpfp-tabs::-webkit-scrollbar{ display: none; }
	.lpfp-tab{ white-space: nowrap; flex: none; }
	.lpfp-card__head{ padding: 14px; }
	.lpfp-card__body{ padding: 4px 14px 14px; }
	.lpfp-match{ padding: 10px; }
	.lpfp-match__eq{ font-size: 13px; gap: 6px; }
	.lpfp-kpi__valor{ font-size: 28px; }
	.lpfp-res li{ font-size: 13px; }
}

/* Barra lateral de las notas (entre "Síguenos" y "Lo más leído") */
.lpfp-nota-widget{ margin-top: 22px; }
.lpfp-nota-widget + .lpf-widget{ margin-top: 22px; }
.lpfp-card--lateral .lpfp-card__torneo{ font-size: 16px; }
.lpfp-card--lateral .lpfp-card__body{ padding: 2px 16px 16px; }
.lpfp-card--lateral .lpfp-card__head{ padding: 14px 16px; flex-direction: column; gap: 6px; }
.lpfp-card--lateral .lpfp-card__upd{ text-align: left; }
.lpfp-chip{ white-space: nowrap; }
.lpfp-card--lateral .lpfp-chip{ font-size: 10px; padding: 2px 8px; gap: 5px; letter-spacing: .03em; }
.lpfp-card--lateral .lpfp-chip::before{ width: 5px; height: 5px; }

/* Cuadrangulares en PC: la tabla cabe entera en la tarjeta del grupo
   (antes "Campeón" quedaba cortado) y sin el hueco que el tema daba al h3. */
@media (min-width: 601px){
	.lpfp .lpfp-grupo h3{ margin: 0 !important; }
	.lpfp-grupo .lpfp-tabla th, .lpfp-grupo .lpfp-tabla td{ padding-left: 6px; padding-right: 6px; }
	.lpfp-grupo .lpfp-tabla .lpfp-eq{ min-width: 0; padding-left: 12px; }
	.lpfp-grupo .lpfp-tabla td.lpfp-heat{ min-width: 54px; }
	.lpfp-grupo .lpfp-tabla th:last-child, .lpfp-grupo .lpfp-tabla td:last-child{ padding-right: 12px; }
	.lpfp-grupo .lpfp-tabla{ margin: 0; }
	.lpfp-grupo .lpfp-tabla td.lpfp-eq, .lpfp-grupo .lpfp-tabla td.lpfp-eq *{ white-space: normal; line-height: 1.3; }
}
