/**
 * Estilos para o leaderboard
 * Arquivo: assets/css/adf-leaderboard.css
 */

/* Container principal */
.adf-leaderboard-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 20px 0;
    font-family: 'Nunito', sans-serif;
}

/* Cabeçalho com título e abas */
.adf-leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eaeaea;
    padding-bottom: 15px;
}

.adf-leaderboard-title {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 700;
}

.adf-leaderboard-tabs {
    display: flex;
    gap: 10px;
}

.adf-tab {
    padding: 8px 15px;
    border-radius: 20px;
    background-color: #f5f5f5;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

.adf-tab:hover {
    background-color: #e0e0e0;
}

.adf-tab.active {
    background-color: #4a8eff;
    color: white;
}

/* Tabela de classificação */
.adf-leaderboard-table {
    width: 100%;
}

.adf-leaderboard-row {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 6px;
    transition: background-color 0.2s;
}

.adf-leaderboard-row:hover {
    background-color: #f9f9f9;
}

.adf-header-row {
    font-weight: 700;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.adf-current-user {
    background-color: rgba(74, 142, 255, 0.1);
    border: 1px solid rgba(74, 142, 255, 0.3);
}

/* Colunas da tabela */
.adf-rank-column {
    width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

.adf-user-column {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.adf-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.adf-user-name {
    font-weight: 600;
}

.adf-xp-column {
    width: 80px;
    text-align: right;
    font-weight: 700;
    color: #4a8eff;
}

.adf-streak-column, .adf-perfect-column {
    width: 60px;
    text-align: center;
    font-weight: 700;
}

/* Separador para a posição do usuário atual */
.adf-user-rank-separator {
    text-align: center;
    margin: 10px 0;
    color: #999;
    font-size: 18px;
}

/* Mensagem quando não há dados */
.adf-leaderboard-empty {
    text-align: center;
    padding: 30px;
    color: #999;
}

/* Estilos do Widget de Leaderboard */
.adf-leaderboard-widget {
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.adf-widget-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 10px 0;
}

.adf-widget-leaders {
    list-style: none;
    padding: 0;
    margin: 0;
}

.adf-widget-item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.adf-widget-item:last-child {
    border-bottom: none;
}

.adf-widget-rank {
    width: 24px;
    text-align: center;
    font-weight: bold;
    font-size: 14px;
}

.adf-widget-user {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.adf-widget-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.adf-widget-name {
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
}

.adf-widget-xp {
    font-size: 13px;
    font-weight: 700;
    color: #4a8eff;
}

.adf-widget-more {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 13px;
    color: #4a8eff;
    text-decoration: none;
}

.adf-widget-more:hover {
    text-decoration: underline;
}

/* Animação de XP */
.adf-xp-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(74, 142, 255, 0.9);
    color: white;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 24px;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    transition: all 0.3s ease;
}

.adf-xp-animation-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.2);
}

.adf-xp-animation-hide {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Responsivo */
@media (max-width: 767px) {
    .adf-leaderboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .adf-perfect-column {
        display: none;
    }
    
    .adf-widget-name {
        max-width: 80px;
    }
}