/**
 * SportCriss Lite – Estilos de vistas públicas
 *
 * CSS de componente únicamente. Sin grid de página ni layout global.
 * Compatible con cualquier tema de WordPress.
 *
 * @package SportCrissLite
 * @since   1.0.0
 */

/* ── Base ──────────────────────────────────────────────── */
.scl-pub { font-family: inherit; }
.scl-pub-error { color: #dc3545; font-size: .875rem; }
.scl-pub-empty {
    padding: 1.5rem;
    text-align: center;
    color: #888;
    font-size: .9rem;
}

/* ── Tabla de posiciones ───────────────────────────────── */
.scl-pub-tabla__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
    flex-wrap: wrap;
    gap: .375rem;
}
.scl-pub-tabla__titulo { font-weight: 700; font-size: .95rem; }
.scl-pub-tabla__grupo {
    font-size: .75rem;
    font-weight: 600;
    background: #f0f4f8;
    padding: 2px 8px;
    border-radius: 12px;
}
.scl-pub-tabla__wrap { overflow-x: auto; }
.scl-pub-tabla__table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.scl-pub-tabla__table thead th {
    padding: 8px 6px;
    text-align: center;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #555;
    border-bottom: 2px solid #e8ecef;
    white-space: nowrap;
}
.scl-pub-col-equipo { text-align: left !important; }
.scl-pub-col-pos    { width: 32px; }
.scl-pub-col-escudo { width: 36px; }
.scl-pub-tabla__table tbody td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.scl-pub-tabla__fila:hover td { background: #f8f9fa; }
.scl-pub-tabla__fila--lider td { background: #fffbf0; }
.scl-pub-col-pts strong { font-weight: 800; font-size: 1rem; }
.scl-pub-tabla__footer { margin-top: .5rem; }
.scl-pub-tabla__footer small { font-size: .7rem; color: #aaa; }

/* ── Escudos ───────────────────────────────────────────── */
.scl-pub-escudo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    vertical-align: middle;
}
.scl-pub-escudo--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #e8ecef;
    font-weight: 700;
    font-size: .75rem;
    color: #555;
}

/* ── Resultados y Próximos ─────────────────────────────── */
.scl-pub-resultados,
.scl-pub-proximos { display: flex; flex-direction: column; gap: .5rem; }

.scl-pub-resultado,
.scl-pub-proximo {
    padding: .75rem 1rem;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    background: #fff;
}

.scl-pub-resultado__meta {
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-bottom: .5rem;
    font-size: .75rem;
    color: #888;
    flex-wrap: wrap;
}
.scl-pub-resultado__marcador {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}
.scl-pub-resultado__equipo {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1;
    min-width: 0;
}
.scl-pub-resultado__equipo--visita { flex-direction: row-reverse; }
.scl-pub-nombre {
    font-weight: 600;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.scl-pub-resultado__score {
    display: flex;
    align-items: center;
    gap: .375rem;
    flex-shrink: 0;
}
.scl-pub-goles {
    font-size: 1.25rem;
    font-weight: 800;
    min-width: 24px;
    text-align: center;
}
.scl-pub-vs {
    font-size: .875rem;
    font-weight: 700;
    color: #aaa;
    padding: 0 .25rem;
}
.scl-pub-guion  { color: #ccc; font-weight: 400; }
.scl-pub-penales {
    text-align: center;
    font-size: .75rem;
    color: #888;
    margin-top: 4px;
}
.scl-pub-badge {
    padding: 1px 6px;
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 600;
}
.scl-pub-badge--playoff { background: #e2d9f3; color: #4a235a; }

/* ── Perfil de equipo ──────────────────────────────────── */
.scl-pub-equipo__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.scl-pub-equipo__escudo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}
.scl-pub-equipo__escudo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 8px;
    background: #e8ecef;
    font-weight: 800;
    font-size: 1.25rem;
    color: #555;
    flex-shrink: 0;
}
.scl-pub-equipo__nombre {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 .25rem;
}
.scl-pub-equipo__zona {
    font-size: .8125rem;
    color: #888;
}
.scl-pub-equipo__stats {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.scl-pub-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .125rem;
    background: #f8f9fa;
    border: 1px solid #e8ecef;
    border-radius: 8px;
    padding: .625rem .75rem;
    min-width: 52px;
}
.scl-pub-stat__valor { font-size: 1.1rem; font-weight: 800; }
.scl-pub-stat__label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #888;
}
.scl-pub-equipo__torneos-titulo {
    font-size: .9rem;
    font-weight: 700;
    margin: 0 0 .625rem;
}
.scl-pub-equipo__torneos-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .375rem;
}
.scl-pub-equipo__torneo-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
}
.scl-pub-equipo__torneo-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 3px;
}

/* ── Directorio de torneos ─────────────────────────────── */
.scl-pub-torneos-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax( 180px, 1fr ) );
    gap: 1rem;
}
.scl-pub-torneo-card {
    border: 1px solid #e8ecef;
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
    background: #fff;
    text-decoration: none;
    color: inherit;
    transition: box-shadow .15s;
    display: block;
}
.scl-pub-torneo-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.scl-pub-torneo-card img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: .5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.scl-pub-torneo-card__placeholder {
    width: 60px;
    height: 60px;
    background: #e8ecef;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #555;
    margin: 0 auto .5rem;
}
.scl-pub-torneo-card__nombre { font-weight: 700; font-size: .9rem; }

/* ═══════════════════════════════════════════
   SPONSOR — estructura completa
   ═══════════════════════════════════════════ */

.scl-sponsor {
    display: block;
    width: 100%;
    max-width: var(--ad-max-width, 300px);
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    background: #fff;
    font-family: var(--scl-font-pub, sans-serif);
    position: relative;
}
.scl-sponsor--horizontal { max-width: 728px; }
.scl-sponsor--vertical   { max-width: 300px; }
.scl-sponsor--cuadrado   { max-width: 300px; }
.scl-sponsor--banner     { max-width: 336px; }
.scl-sponsor--cartelera  { max-width: 970px; }
.scl-sponsor--movil      { max-width: 320px; }

/* Contenedor de imagen — ocupa exactamente el ratio */
.scl-sponsor__media {
    display: block;
    width: 100%;
    aspect-ratio: var(--ad-ratio, 300/250);
    overflow: hidden;
    border-radius: 5px 5px 0 0;
    line-height: 0;
    font-size: 0;
}

/* Enlace — ocupa todo el __media */
.scl-sponsor__enlace {
    display: block;
    width: 100%;
    height: 100%;
    line-height: 0;
    font-size: 0;
}

/* Imagen — llena el enlace */
.scl-sponsor__img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Neutralizar resets de Elementor */
.elementor .scl-sponsor__img {
    height: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.elementor .scl-sponsor__enlace {
    height: 100% !important;
}
.elementor .scl-sponsor__media {
    line-height: 0 !important;
    font-size: 0 !important;
}

/* Footer — pegado inmediatamente debajo de la imagen */
.scl-sponsor__pie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    background: #f5f5f5;
    border-top: 1px solid #e8e8e8;
    line-height: 1;
}

.scl-sponsor__label {
    font-size: 0.65rem;
    color: #999;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.scl-sponsor__opciones {
    background: none;
    border: none;
    cursor: pointer;
    color: #bbb;
    padding: 2px 4px;
    border-radius: 4px;
    line-height: 1;
    display: flex;
    align-items: center;
    transition: color 0.15s, background 0.15s;
}
.scl-sponsor__opciones:hover {
    color: #666;
    background: #e8e8e8;
}

/* Dropdown */
.scl-sponsor__menu {
    display: none;
    position: absolute;
    bottom: 42px;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 210px;
    z-index: 9999;
}
.scl-sponsor__menu.open { display: block; }

.scl-sponsor__menu-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    width: 100%;
    padding: 0.625rem 1rem;
    background: none;
    border: none;
    text-align: left;
    font-size: 0.82rem;
    color: #333;
    cursor: pointer;
    transition: background 0.1s;
    font-family: inherit;
    line-height: 1.4;
}
.scl-sponsor__menu-item:hover { background: #f5f5f5; }

.scl-sponsor__menu-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
    display: flex;
    align-items: center;
}
.scl-sponsor__menu-icon img {
    width: 16px !important;
    height: 16px !important;
}

.scl-sponsor__menu-divider {
    height: 1px;
    background: #f0f0f0;
    margin: 4px 0;
}

/* ── Modales de feedback de anuncio ─────────────────────── */
.scl-sponsor-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}
.scl-sponsor-modal {
    background: #fff;
    border-radius: 14px;
    padding: 1.5rem;
    max-width: 380px;
    width: 100%;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,0.2);
    font-family: var(--scl-font-pub, sans-serif);
}
.scl-sponsor-modal__close {
    position: absolute;
    top: 12px; right: 14px;
    background: none; border: none;
    font-size: 1rem; color: #aaa;
    cursor: pointer; line-height: 1;
}
.scl-sponsor-modal__close:hover { color: #333; }
.scl-sponsor-modal__titulo {
    font-size: 1rem; font-weight: 700;
    color: #2c3e50; margin-bottom: 0.375rem;
}
.scl-sponsor-modal__desc {
    font-size: 0.82rem; color: #888;
    line-height: 1.5; margin-bottom: 1rem;
}
.scl-sponsor-modal__acciones {
    display: flex; gap: 0.5rem;
    margin-top: 1rem; flex-wrap: wrap;
}
.scl-sponsor-modal__btn {
    flex: 1; padding: 0.625rem 1rem;
    border-radius: 8px; border: none;
    font-size: 0.875rem; font-weight: 600;
    cursor: pointer; text-align: center;
    font-family: inherit; transition: opacity 0.15s;
}
.scl-sponsor-modal__btn:hover { opacity: 0.85; }
.scl-sponsor-modal__btn--ok     { background: var(--scl-primary, #1a3a5c); color: #fff; }
.scl-sponsor-modal__btn--ghost  { background: #f0f2f5; color: #555; }
.scl-sponsor-modal__btn--danger { background: #e74c3c; color: #fff; }

/* Motivos de denuncia */
.scl-sponsor-motivos {
    display: flex; flex-direction: column;
    gap: 6px; margin-bottom: 0.875rem;
}
.scl-sponsor-motivo {
    display: flex; align-items: center;
    gap: 0.5rem; padding: 0.5rem 0.75rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px; cursor: pointer;
    font-size: 0.82rem; transition: border-color 0.15s;
}
.scl-sponsor-motivo:has(input:checked) {
    border-color: var(--scl-primary, #1a3a5c);
    background: rgba(26,58,92,0.04);
}
.scl-sponsor-motivo input[type="radio"] { display: none; }
.scl-sponsor-modal__textarea {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px; font-size: 0.82rem;
    resize: none; font-family: inherit;
    outline: none; transition: border-color 0.15s;
}
.scl-sponsor-modal__textarea:focus {
    border-color: var(--scl-primary, #1a3a5c);
}

/* ── Fixture ─────────────────────────────── */
.scl-pub-fixture { }
.scl-pub-jornada-header {
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.08em; color: #888;
    padding: 0.5rem 0; margin: 1rem 0 0.5rem;
    border-bottom: 2px solid #e8ecef;
}
.scl-pub-fixture-partido {
    display: flex; align-items: center;
    gap: 0.75rem; padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.scl-pub-fixture-partido:last-child { border-bottom: none; }
.scl-pub-fixture__fecha {
    font-size: 0.75rem; color: #888;
    min-width: 80px; flex-shrink: 0;
}
.scl-pub-fixture__hora { font-weight: 600; color: #555; font-size: 0.8rem; }
.scl-pub-fixture__sede { font-size: 0.72rem; color: #aaa; margin-top: 2px; }

/* ── Bracket ─────────────────────────────── */
.scl-pub-bracket { overflow-x: auto; }
.scl-pub-bracket__columnas {
    display: flex; gap: 2rem;
    min-width: max-content; padding: 1rem 0;
}
.scl-pub-bracket__fase { min-width: 220px; }
.scl-pub-bracket__fase-titulo {
    font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #888; margin-bottom: 0.75rem;
    text-align: center;
}
.scl-pub-llave {
    background: #fff; border: 1px solid #e8ecef;
    border-radius: 8px; padding: 0.875rem;
    margin-bottom: 1rem;
}
.scl-pub-llave__equipo {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 4px 0;
}
.scl-pub-llave__equipo--ganador { font-weight: 700; }
.scl-pub-llave__equipo--perdedor { opacity: 0.55; }
.scl-pub-llave__sep {
    border-top: 1px dashed #eee; margin: 6px 0;
}
.scl-pub-llave__resultado {
    font-size: 0.75rem; color: #888;
    text-align: center; margin-top: 6px;
}

/* ── Ficha partido ───────────────────────── */
.scl-pub-ficha { }
.scl-pub-ficha__meta {
    font-size: 0.8rem; color: #888;
    text-align: center; margin-bottom: 1.5rem;
}
.scl-pub-ficha__marcador {
    display: flex; align-items: center;
    justify-content: center; gap: 1.5rem;
    margin: 1.5rem 0;
}
.scl-pub-ficha__equipo {
    text-align: center; flex: 1;
}
.scl-pub-ficha__escudo {
    width: 72px; height: 72px;
    object-fit: contain; margin: 0 auto 0.5rem;
    display: block;
}
.scl-pub-ficha__nombre { font-weight: 700; font-size: 1rem; }
.scl-pub-ficha__goles {
    font-size: 3rem; font-weight: 800;
    color: var(--scl-primary); min-width: 60px;
    text-align: center; line-height: 1;
}
.scl-pub-ficha__vs { font-size: 1.5rem; color: #ccc; font-weight: 400; }
.scl-pub-ficha__penales {
    text-align: center; font-size: 0.8rem;
    color: #888; margin-top: 0.5rem;
}

/* ── Plantilla ───────────────────────────── */
.scl-pub-plantilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
}
.scl-pub-jugador-card {
    background: #fff; border: 1px solid #e8ecef;
    border-radius: 10px; overflow: hidden;
    text-align: center;
}
.scl-pub-jugador-card__foto {
    width: 100%; aspect-ratio: 1;
    object-fit: cover; background: #f0f4f8;
}
.scl-pub-jugador-card__foto-placeholder {
    width: 100%; aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    font-size: 2.5rem; font-weight: 800;
    color: var(--scl-primary); background: #f0f4f8;
}
.scl-pub-jugador-card__body { padding: 0.75rem; }
.scl-pub-jugador-card__dorsal {
    display: inline-block; background: var(--scl-primary); color: #fff;
    width: 26px; height: 26px; line-height: 26px;
    border-radius: 50%; font-size: 0.75rem; font-weight: 700;
    margin-bottom: 4px;
}
.scl-pub-jugador-card__nombre { font-weight: 700; font-size: 0.875rem; }
.scl-pub-jugador-card__posicion { font-size: 0.75rem; color: #888; }
.scl-pub-jugador-card__stats {
    display: flex; justify-content: center; gap: 0.75rem;
    font-size: 0.75rem; color: #555;
    padding: 0.5rem 0 0;
    border-top: 1px solid #f0f0f0;
    margin-top: 0.5rem;
}

/* ── Stats jugador ───────────────────────── */
.scl-pub-stats-jugador__header {
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1.5rem;
}
.scl-pub-stats-jugador__foto {
    width: 80px; height: 80px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
    border: 3px solid #e8ecef;
}
.scl-pub-stats-jugador__info h3 { margin: 0 0 4px; }
.scl-pub-stats-jugador__pos { font-size: 0.8rem; color: #888; }

.scl-pub-stats-jugador__tabla {
    width: 100%; border-collapse: collapse; font-size: 0.875rem;
}
.scl-pub-stats-jugador__tabla th {
    padding: 8px 6px; text-align: center;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.05em;
    color: #555; border-bottom: 2px solid #e8ecef;
}
.scl-pub-stats-jugador__tabla td {
    padding: 8px 6px; text-align: center;
    border-bottom: 1px solid #f0f0f0;
}
.scl-pub-stats-jugador__total td {
    font-weight: 700; border-top: 2px solid #e8ecef;
    background: #f8f9fa;
}

/* ── Sedes ───────────────────────────────── */
.scl-pub-sedes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1rem;
}
.scl-pub-sede-card {
    background: #fff; border: 1px solid #e8ecef;
    border-radius: 8px; padding: 1rem;
}
.scl-pub-sede-card__nombre { font-weight: 700; font-size: 0.95rem; }
.scl-pub-sede-card__ciudad { font-size: 0.8rem; color: #888; margin-bottom: 6px; }
.scl-pub-sede-card__dir { font-size: 0.82rem; color: #555; margin-bottom: 8px; }
.scl-pub-sede-card__cap { font-size: 0.78rem; color: #888; }
.scl-pub-sede-card__maps {
    display: inline-block; margin-top: 0.5rem;
    font-size: 0.82rem; color: var(--scl-primary);
    text-decoration: none; font-weight: 600;
}
.scl-pub-sede-card__maps:hover { text-decoration: underline; }
