/* ============================================================
   Control Prode – Frontend Ranking CSS
   Shortcodes: [ranking_profesionales] [ranking_familias]
   ============================================================ */

.cp-front-ranking {
    max-width: 700px;
    margin: 24px auto;
    font-family: inherit;
}

.cp-front-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2271b1;
    color: #1d2327;
}

.cp-front-table-wrap {
    overflow-x: auto;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.10);
}

.cp-front-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
}

.cp-front-table thead tr {
    background: #1d2327;
    color: #fff;
}

.cp-front-table thead th {
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    letter-spacing: .3px;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.cp-front-table tbody tr {
    border-bottom: 1px solid #f0f0f1;
    transition: background .15s;
}

.cp-front-table tbody tr:hover {
    background: #f8f9fa;
}

.cp-front-table tbody tr:last-child {
    border-bottom: none;
}

.cp-front-table td {
    padding: 11px 14px;
    vertical-align: middle;
}

/* Posiciones top 3 */
.cp-rank-gold   { background: linear-gradient(90deg, #fffde6 0%, #fff 60%) !important; }
.cp-rank-silver { background: linear-gradient(90deg, #f5f5f5 0%, #fff 60%) !important; }
.cp-rank-bronze { background: linear-gradient(90deg, #fff3ec 0%, #fff 60%) !important; }

/* Celda posición */
.cp-td-pos {
    width: 60px;
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

.cp-medal {
    font-size: 20px;
    vertical-align: middle;
}

.cp-pos-num {
    font-size: 14px;
    color: #555;
    vertical-align: middle;
    margin-left: 2px;
}

/* Avatar */
.cp-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #2271b1;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    margin-right: 10px;
    vertical-align: middle;
    flex-shrink: 0;
}

.cp-avatar-fam {
    background: #46a35e;
}

.cp-td-name {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Para familias el td-name no es flex, usamos inline */
.cp-front-fam .cp-td-name {
    display: table-cell;
}

.cp-front-fam .cp-avatar {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 10px;
}

.cp-uname {
    vertical-align: middle;
    font-weight: 500;
}

/* Pronósticos */
.cp-td-pron {
    width: 60px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

/* Puntos */
.cp-td-pts {
    width: 80px;
    text-align: right;
    font-size: 20px;
    font-weight: 800;
    color: #2271b1;
    padding-right: 18px !important;
}

.cp-rank-gold   .cp-td-pts { color: #c9a227; }
.cp-rank-silver .cp-td-pts { color: #7a7a7a; }
.cp-rank-bronze .cp-td-pts { color: #c07840; }

/* Integrantes */
.cp-td-members {
    color: #555;
    font-size: 12px;
    max-width: 240px;
}

/* Nota */
.cp-front-note {
    font-size: 11px;
    color: #999;
    margin-top: 10px;
    text-align: right;
}

.cp-front-empty {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 24px;
}

/* Responsive */
@media (max-width: 600px) {
    .cp-front-table thead th,
    .cp-front-table tbody td {
        padding: 9px 10px;
        font-size: 13px;
    }
    .cp-td-pts {
        font-size: 17px;
    }
    .cp-avatar {
        width: 28px;
        height: 28px;
        font-size: 11px;
    }
    .cp-td-members {
        display: none;
    }
    .cp-th-members {
        display: none;
    }
}
