/* ==========================================================================
   Detalle público de torneo (/torneos/{slug})
   Diseño cohesivo con /partidos y /partidos/{id} (Flashscore + Fair Play Kids)
   Paleta estricta: Negro / Neutros oscuros, Blanco y Rojo corporativo (#dc3545)
   ========================================================================== */

.fpk-td-wrap {
    color: #ffffff;
}

.fpk-td-inner {
    max-width: 1140px;
    margin: 0 auto;
}

/* Barra superior de navegación */
.fpk-td-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.fpk-td-pill-btn {
    background-color: #111116;
    border: 1px solid #252530;
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.46rem 1.05rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.fpk-td-pill-btn:hover,
.fpk-td-pill-btn:focus {
    background-color: #181820;
    border-color: #dc3545;
    color: #ffffff;
}

/* Tarjeta hero del torneo */
.fpk-td-hero {
    background-color: #111116;
    border: 1px solid #22222b;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 1.75rem;
}

.fpk-td-hero-bar {
    background-color: #0c0c10;
    border-bottom: 1px solid #1e1e26;
    padding: 0.65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fpk-td-type-tag {
    font-size: 0.72rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    background-color: #181822;
    border: 1px solid #2b2b38;
    border-radius: 999px;
    padding: 0.18rem 0.65rem;
}

.fpk-td-cat-square {
    background-color: rgba(220, 53, 69, 0.14);
    border: 1px solid rgba(220, 53, 69, 0.45);
    border-radius: 6px;
    padding: 0.22rem 0.6rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.15;
    white-space: nowrap;
}

.fpk-td-hero-body {
    padding: 1.45rem 1.25rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
}

.fpk-td-hero-logo-wrap {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fpk-td-hero-logo {
    width: 100%;
    height: 100%;
    max-width: 68px;
    max-height: 68px;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
}

.fpk-td-hero-monogram {
    width: 62px;
    height: 62px;
    border-radius: 14px;
    background-color: #161622;
    border: 1px solid #2e2e3c;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.25rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fpk-td-hero-info {
    flex: 1;
    min-width: 220px;
}

.fpk-td-hero-title {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 0.5rem;
}

.fpk-td-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

.fpk-td-dot {
    color: rgba(255, 255, 255, 0.3);
}

/* Badges de estado / posiciones */
.fpk-td-status-badge {
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.22rem 0.7rem;
    border-radius: 999px;
    white-space: nowrap;
}

.fpk-td-status-badge.is-active {
    background-color: rgba(220, 53, 69, 0.14);
    border: 1px solid rgba(220, 53, 69, 0.45);
    color: #ffffff;
}

.fpk-td-status-badge.is-champion {
    background-color: rgba(220, 53, 69, 0.18);
    border: 1px solid #dc3545;
    color: #ffffff;
}

.fpk-td-status-badge.is-runner-up {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.fpk-td-status-badge.is-third {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: rgba(255, 255, 255, 0.85);
}

.fpk-td-status-badge.is-finished {
    background-color: #16161f;
    border: 1px solid #2b2b38;
    color: rgba(255, 255, 255, 0.68);
}

/* Encabezados de sección y píldoras */
.fpk-td-section-card {
    background-color: #111116;
    border: 1px solid #22222b;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.fpk-td-section-header {
    background-color: #0c0c10;
    border-bottom: 1px solid #1e1e26;
    padding: 0.7rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.fpk-td-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.fpk-td-meta-pill {
    background-color: #16161f;
    border: 1px solid #2b2b38;
    border-radius: 999px;
    padding: 0.18rem 0.65rem;
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.78);
}

/* Bloques de fecha y filas de partidos (coherentes con /partidos) */
.fpk-td-date-heading {
    font-size: 0.86rem;
    font-weight: 700;
    color: #ffffff;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
    padding-left: 0.15rem;
}

.fpk-td-date-heading:first-child {
    margin-top: 0;
}

.fpk-td-matches-group {
    border: 1px solid #22222b;
    border-radius: 10px;
    overflow: hidden;
    background-color: #111116;
    margin-bottom: 1rem;
}

.fpk-td-match-row {
    display: flex;
    align-items: center;
    padding: 0.58rem 0.85rem;
    background-color: #111116;
    text-decoration: none;
    color: #ffffff;
    border-bottom: 1px solid #1c1c24;
    transition: background-color 0.15s ease;
}

.fpk-td-match-row:last-child {
    border-bottom: none;
}

.fpk-td-match-row:hover {
    background-color: #171720;
    color: #ffffff;
}

/* Columna de hora */
.fpk-td-time-col {
    width: 68px;
    flex-shrink: 0;
    padding-right: 0.6rem;
    margin-right: 0.7rem;
    border-right: 1px solid #1e1e26;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.fpk-td-time-text {
    font-size: 0.76rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.2;
    white-space: nowrap;
}

.fpk-td-status-sub {
    font-size: 0.64rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 2px;
    line-height: 1;
}

/* Columna de equipos */
.fpk-td-teams-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.34rem;
}

.fpk-td-team-line {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    height: 21px;
}

.fpk-td-team-crest {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.fpk-td-team-monogram {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    background-color: #1e1e28;
    border: 1px solid #2c2c3a;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.56rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fpk-td-team-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fpk-td-team-name.is-winner {
    font-weight: 700;
    color: #ffffff;
}

.fpk-td-team-name.is-muted-loser {
    color: rgba(255, 255, 255, 0.65);
}

/* Columna de marcador (un solo color uniforme) */
.fpk-td-scores-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.34rem;
    margin-left: 0.65rem;
    min-width: 26px;
    font-variant-numeric: tabular-nums;
}

.fpk-td-score-line {
    height: 21px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
}

.fpk-td-score-line.is-unplayed {
    color: rgba(255, 255, 255, 0.38);
    font-weight: 600;
}

/* Rendimiento del equipo (Stats Grid) */
.fpk-td-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: #1e1e26;
}

.fpk-td-stat-tile {
    background-color: #111116;
    padding: 0.85rem 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.fpk-td-stat-tile.is-highlight {
    background-color: rgba(220, 53, 69, 0.08);
}

.fpk-td-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 0.25rem;
    letter-spacing: 0.04em;
}

.fpk-td-stat-val {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.fpk-td-stat-tile.is-highlight .fpk-td-stat-val {
    color: #ff4d5a;
}

/* Tabla de estadísticas de jugadores */
.fpk-td-table {
    width: 100%;
    margin-bottom: 0;
    color: #ffffff;
    border-collapse: collapse;
}

.fpk-td-table th {
    background-color: #0c0c10;
    border-bottom: 1px solid #1e1e26;
    color: rgba(255, 255, 255, 0.52);
    font-size: 0.74rem;
    font-weight: 700;
    padding: 0.65rem 0.85rem;
    text-align: center;
    white-space: nowrap;
}

.fpk-td-table th.is-player-col {
    text-align: left;
    padding-left: 1.1rem;
}

.fpk-td-table td {
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid #1b1b22;
    font-size: 0.84rem;
    text-align: center;
    font-variant-numeric: tabular-nums;
    vertical-align: middle;
}

.fpk-td-table tr:last-child td {
    border-bottom: none;
}

.fpk-td-table tbody tr {
    transition: background-color 0.15s ease;
}

.fpk-td-table tbody tr:hover {
    background-color: #171720;
}

.fpk-td-table td.is-player-col {
    text-align: left;
    padding-left: 1.1rem;
}

.fpk-td-player-link {
    display: inline-flex;
    align-items: center;
    gap: 0;
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
    min-width: 0;
}

.fpk-td-player-link:hover {
    color: #ff4d5a;
}

.fpk-td-player-dorsal {
    display: inline-block;
    width: 44px;
    min-width: 44px;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    text-align: left;
    color: rgba(255, 255, 255, 0.45);
    font-weight: 700;
    letter-spacing: 0.01em;
}

.fpk-td-player-name {
    display: inline-block;
    color: inherit;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fpk-td-stat-num {
    font-weight: 700;
    color: #ffffff;
}

.fpk-td-stat-empty {
    color: rgba(255, 255, 255, 0.28);
    font-weight: 500;
}

/* Tarjetas de premios / palmarés */
.fpk-td-awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.fpk-td-award-card {
    background-color: #111116;
    border: 1px solid #22222b;
    border-radius: 12px;
    padding: 1.15rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
    height: 100%;
}

.fpk-td-award-card:hover {
    background-color: #16161e;
    border-color: #dc3545;
    transform: translateY(-2px);
    color: #ffffff;
}

.fpk-td-award-title {
    font-size: 0.74rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.85rem;
    line-height: 1.25;
}

.fpk-td-award-icon {
    height: 52px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 0.85rem;
    filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.45));
}

.fpk-td-award-winner {
    font-size: 0.92rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 0.25rem;
}

.fpk-td-award-card:hover .fpk-td-award-winner {
    color: #ff4d5a;
}

.fpk-td-award-sub {
    font-size: 0.74rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.52);
    line-height: 1.2;
}

/* Estado vacío */
.fpk-td-empty {
    padding: 2.25rem 1.25rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.86rem;
}

@media (max-width: 575.98px) {
    .fpk-td-hero-body {
        padding: 1.15rem 1rem;
        gap: 0.85rem;
    }

    .fpk-td-hero-logo-wrap {
        width: 54px;
        height: 54px;
    }

    .fpk-td-hero-title {
        font-size: 1.18rem;
    }

    .fpk-td-match-row {
        padding: 0.52rem 0.65rem;
    }

    .fpk-td-time-col {
        width: 62px;
        padding-right: 0.45rem;
        margin-right: 0.55rem;
    }

    .fpk-td-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
