/**
 * FPC Sistema 2.0 - Public Styles
 * @since 2.0.0
 */

/* Rankings */
.fpc-rankings {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Atleta Perfil */
.fpc-atleta-perfil {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Etapas */
.fpc-etapas {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Shortcodes em desenvolvimento */
.fpc-rankings p,
.fpc-atleta-perfil p,
.fpc-etapas p {
    color: #666;
    font-style: italic;
}

.fpc-rank-nav {
    display: flex;
    gap: 6px;
    margin: 8px 0 0;
    justify-content: flex-end;
}
.fpc-rank-nav .button {
    padding: 4px 8px;
    font-size: 12px;
    background: #f7f7f7;
    border-color: #ddd;
    color: #444;
}
.fpc-rank-nav .button.active {
    background: #eee;
    border-color: #ccc;
    font-weight: 600;
}

.fpc-ranking-filtros {
    background: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.fpc-filtros-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 10px;
}
.fpc-filtros-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin: 8px 0 4px;
}
#fpc-cat-result {
    display: none;
}
#fpc-modalidade,
#fpc-cat-select,
#fpc-ano {
    width: 100%;
    margin-bottom: 8px;
    padding: 6px 8px;
    font-size: 13px;
}
#fpc-aplicar {
    width: 100%;
    margin-top: 4px;
}
#fpc-cat-result {
    max-height: 200px;
    overflow: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
    margin-top: 4px;
    margin-bottom: 10px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
#fpc-cat-result div {
    padding: 6px 8px;
    cursor: pointer;
}
#fpc-cat-result div:hover {
    background: #f5f5f5;
}

/* Ranking tabela e layout */
.fpc-ranking-wrap {
    margin-top: 16px;
}

.fpc-ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}
.fpc-ranking-header-main h2 {
    margin: 0 0 4px;
    font-size: 18px;
}
.fpc-ranking-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
}
.fpc-ranking-badge {
    background: #2E8B57;
    color: #fff;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}
.fpc-ranking-updated {
    color: #777;
}
#fpc-ranking-summary {
    font-size: 12px;
    color: #555;
    text-align: right;
}

#fpc-ranking-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fpc-ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 720px;
}

.fpc-ranking-table thead th {
    background: #f5f5f5;
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    white-space: nowrap;
}

.fpc-ranking-table tbody td {
    padding: 6px 8px;
    border-bottom: 1px solid #f1f1f1;
}

.fpc-ranking-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.fpc-ranking-table tbody tr.top-3 td:first-child {
    font-weight: 700;
    font-size: 14px;
}

.fpc-ranking-table tbody tr.top-3:nth-child(1) {
    background: linear-gradient(to right, #fff9e6, #fffef8);
}

.fpc-ranking-table tbody tr.top-3:nth-child(2) {
    background: linear-gradient(to right, #f5f7fa, #ffffff);
}

.fpc-ranking-table tbody tr.top-3:nth-child(3) {
    background: linear-gradient(to right, #fff3e6, #ffffff);
}

.fpc-ranking-table th:nth-child(1),
.fpc-ranking-table td:nth-child(1) {
    width: 60px;
    text-align: center;
}
.fpc-ranking-table th:nth-child(2),
.fpc-ranking-table td:nth-child(2) {
    width: 30%;
}

.fpc-ranking-table tbody tr.top-3:nth-child(1) td:first-child::before {
    content: "🥇";
    margin-right: 4px;
}
.fpc-ranking-table tbody tr.top-3:nth-child(2) td:first-child::before {
    content: "🥈";
    margin-right: 4px;
}
.fpc-ranking-table tbody tr.top-3:nth-child(3) td:first-child::before {
    content: "🥉";
    margin-right: 4px;
}

/* Botão flutuante de filtro (mobile) */
.fpc-filter-fab {
    position: fixed !important;
    left: 0 !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    z-index: 10 !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 0 28px 28px 0 !important;
    border: none !important;
    background-color: #2E8B57 !important;
    background-image: url('filter.png') !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
    background-size: 17px 17px !important;
    color: #fff !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25) !important;
    cursor: pointer !important;
    padding: 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
}

.fpc-filtros-close {
    display: none !important;
}

@media (max-width: 768px) {
    .fpc-ranking-filtros {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 80%;
        max-width: 320px;
        transform: translateX(-100%);
        transition: transform 0.25s ease-out;
        z-index: 9998;
        overflow-y: auto;
    }

    .fpc-ranking-filtros.is-open {
        transform: translateX(0);
    }

    .fpc-filter-fab {
        display: flex !important;
    }

    .fpc-filtros-close {
        display: block !important;
        width: 100%;
        margin-bottom: 10px;
    }
}

.fpc-ranking-title {
    /* exemplo */
    font-size: 28px;
    text-align: center;
    font-weight: 700;
    margin-bottom: 4px;
}

.fpc-ranking-legend {
    /* exemplo */
    font-size: 14px;
    text-align: center;
    color: #666;
    margin-bottom: 12px;
}