/* ===== css/rank.css ===== */

/* Cabeçalho alinhado com o X centralizado perfeitamente */
.mu-classic-window-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
}

.mu-classic-close {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    text-align: center !important;
    vertical-align: middle !important;
    cursor: pointer;
    background: #111a1c;
    border: 1px solid #324346;
    color: #c0d0d0;
    border-radius: 2px;
}

.mu-classic-close:hover {
    background: #233538;
    color: #fff;
    border-color: #526c70;
}

/* Abas de Categoria */
.rank-tabs-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 10px;
    border-bottom: 1px solid #283638;
    padding-bottom: 6px;
}

.rank-tab-btn {
    background: #0f1618;
    border: 1px solid #2e3e41;
    color: #8fa4a2;
    padding: 5px 12px;
    font: 700 11px Georgia, serif;
    cursor: pointer;
    border-radius: 2px;
}

.rank-tab-btn:hover {
    color: #fff;
    border-color: #4a6266;
}

.rank-tab-btn.active {
    background: linear-gradient(180deg, #2b2313 0%, #120e06 100%);
    border-color: #f0df9a;
    color: #f1df9a;
    box-shadow: 0 0 6px rgba(240, 223, 154, 0.2);
}

/* Tabela de Ranking com crescimento controlado e scroll */
.rank-table-wrapper {
    min-height: 120px;
    max-height: 380px; /* Cresce com os jogadores até aqui, depois ativa a barra de rolagem */
    overflow-y: auto;
    border: 1px solid #222d30;
    background: #050809;
}

.rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.rank-table th {
    background: #0d1416;
    color: #8e9e9d;
    padding: 8px 6px;
    font-family: Georgia, serif;
    font-size: 11px;
    text-align: center;
    border-bottom: 1px solid #2a373a;
    position: sticky;
    top: 0;
    z-index: 2;
}

.rank-table td {
    padding: 7px 6px;
    text-align: center;
    border-bottom: 1px solid #141c1e;
}

.rank-table tr:hover {
    background: #10191c;
}

/* Linha do Próprio Jogador */
.rank-table tr.is-self-row {
    background: rgba(241, 223, 154, 0.08);
}
.rank-table tr.is-self-row td {
    color: #5ced98;
    font-weight: bold;
}

.rank-num { font-weight: bold; color: #f1df9a; }
.rank-nick { font-weight: bold; text-align: center !important; padding-left: 12px !important; color: #e1eeed; }
.rank-nick small { color: #5ced98; font-weight: normal; margin-left: 4px; }
.rank-class { color: #8fa4a2; }
.rank-resets { color: #f1df9a; font-weight: bold; }
.rank-level { color: #7cb3f2; }

/* ---- Barra de criterio e ranking de guildas ---- */
.rank-sort-bar { margin-top:5px; opacity:.95; }
.rank-sort-bar .rank-tab-btn { font-size:10px; }
.rank-tab-guild { border-color:#a5854a !important; color:#f0d78d !important; }
.rank-guild-crest { display:inline-grid; grid-template-columns:repeat(8,1fr); grid-template-rows:repeat(8,1fr); width:14px; height:14px; margin-right:6px; overflow:hidden; border:1px solid #c4a85b; background:#06080a; vertical-align:-2px; }
.rank-guild-crest i { display:block; width:100%; height:100%; }
