/* ==========================================================================
   SKYSTONE WIDGET - TOP PLAYERS V14
   Coluna principal oficial: 535px.
   Começa diretamente nas abas.
   ========================================================================== */

body.template-skystone .thebest-widget {
    width: 100%;

    margin: 10px 0 0;
    padding: 0;

    border: 1px solid #d5e6ea;

    background: rgba(255,255,255,.97);

    overflow: hidden;
}

/* Segurança caso o core volte a emitir o heading. */
body.template-skystone .thebest-widget .thebest-heading {
    display: none !important;
}

/* --------------------------------------------------------------------------
   ABAS PRINCIPAIS
   -------------------------------------------------------------------------- */

body.template-skystone .thebest-widget .thebest-rank-tabs {
    min-height: 42px;

    margin: 0;
    padding: 0 12px;

    display: flex;
    align-items: stretch;
    gap: 22px;

    border-bottom: 1px solid #dcebed;

    background: rgba(249,252,253,.80);
}

body.template-skystone .thebest-widget .thebest-rank-tabs button {
    position: relative;

    min-width: 0;

    margin: 0;
    padding: 0 2px;

    border: 0;
    border-radius: 0;

    background: transparent;

    color: #7898a5;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 8px;
    font-weight: 700;
    line-height: 42px;

    cursor: pointer;
}

body.template-skystone .thebest-widget .thebest-rank-tabs button::after {
    content: "";

    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 2px;

    background: transparent;
}

body.template-skystone .thebest-widget .thebest-rank-tabs button:hover,
body.template-skystone .thebest-widget .thebest-rank-tabs button.active {
    color: #075f78;
}

body.template-skystone .thebest-widget .thebest-rank-tabs button.active::after {
    background: #37b8d0;
}

/* --------------------------------------------------------------------------
   PAINÉIS
   -------------------------------------------------------------------------- */

body.template-skystone .thebest-widget .thebest-rank-panel {
    display: none;
}

body.template-skystone .thebest-widget .thebest-rank-panel.active {
    display: block;
}

body.template-skystone .thebest-widget .thebest-period-tabs {
    min-height: 30px;

    padding: 5px 12px 0;

    display: flex;
    align-items: center;
    gap: 5px;
}

body.template-skystone .thebest-widget .thebest-period-tabs button {
    min-height: 21px;

    padding: 0 8px;

    border: 1px solid #d5e6ea;
    border-radius: 0;

    background: #f8fbfc;

    color: #7998a4;

    font-size: 6.5px;
    font-weight: 600;

    cursor: pointer;
}

body.template-skystone .thebest-widget .thebest-period-tabs button.active {
    border-color: #79c9d8;

    background: #edf9fb;

    color: #075f78;
}

body.template-skystone .thebest-widget .thebest-period-panel {
    display: none;
}

body.template-skystone .thebest-widget .thebest-period-panel.active {
    display: block;
}

/* --------------------------------------------------------------------------
   TOP 5 - AVATARES
   5 cards dentro de 535px.
   -------------------------------------------------------------------------- */

body.template-skystone .thebest-widget .thebest-avatar-grid {
    width: 100%;

    padding: 13px 12px 14px;

    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;

    box-sizing: border-box;
}

body.template-skystone .thebest-widget .thebest-avatar-card {
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;

    margin: 0;
    padding: 0;

    text-align: center;
}

body.template-skystone .thebest-widget .thebest-avatar {
    position: relative;

    width: 76px;
    height: 76px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 0 7px;

    border: 1px solid #cee3e7;

    background:
        linear-gradient(
            135deg,
            rgba(250,254,255,.96),
            rgba(230,247,250,.94)
        );

    color: #1593af;

    font-family: Georgia, "Times New Roman", serif;
    font-size: 29px;
    font-weight: 700;
    line-height: 1;

    box-shadow:
        inset 0 0 0 4px rgba(255,255,255,.65),
        0 5px 14px rgba(75,125,140,.06);

    box-sizing: border-box;
}

/* Losango do template abaixo do avatar. */
body.template-skystone .thebest-widget .thebest-avatar::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -5px;

    width: 7px;
    height: 7px;

    transform:
        translateX(-50%)
        rotate(45deg);

    border: 1px solid #8bc8d4;

    background: #fff;
}

/* Guild usa a mesma moldura, mas mostra a marca. */
body.template-skystone .thebest-widget .thebest-avatar-guild {
    padding: 6px;
}

body.template-skystone .thebest-widget .thebest-avatar-guild img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;
}

body.template-skystone .thebest-widget .thebest-avatar-card > strong {
    display: block;

    width: 100%;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #075f78;

    font-size: 8px;
    font-weight: 700;
    line-height: 1.1;
}

body.template-skystone .thebest-widget .thebest-avatar-card > span {
    display: block;

    margin-top: 4px;

    color: #789ba7;

    font-size: 7px;
    line-height: 1;
}

/* --------------------------------------------------------------------------
   MODELOS/ESTADOS ALTERNATIVOS DO CORE
   -------------------------------------------------------------------------- */

body.template-skystone .thebest-widget .thebest-empty {
    padding: 20px 12px;

    color: #789aa5;

    font-size: 8px;
    text-align: center;
}

/* Caso o Admin mude para table/compact no futuro. */
body.template-skystone .thebest-widget .thebest-table {
    padding: 8px 12px 12px;
}

body.template-skystone .thebest-widget .thebest-row {
    min-height: 27px;

    display: grid;
    grid-template-columns: 20px minmax(0, 1fr) auto;
    gap: 7px;
    align-items: center;

    border-bottom: 1px solid #e2edef;
}

body.template-skystone .thebest-widget .thebest-row:last-child {
    border-bottom: 0;
}

body.template-skystone .thebest-widget .thebest-pos {
    color: #7aa1ae;

    font-size: 7px;
    text-align: center;
}

body.template-skystone .thebest-widget .thebest-row > strong {
    min-width: 0;

    color: #075f78;

    font-size: 7.5px;
}

body.template-skystone .thebest-widget .thebest-row > b {
    color: #087e9d;

    font-size: 7px;
}

body.template-skystone .thebest-widget .thebest-guild-mark-small {
    width: 18px;
    height: 18px;

    vertical-align: middle;
    object-fit: contain;
}

/* Select usado somente se o modelo for "compact". */
body.template-skystone .thebest-widget .thebest-compact-selector {
    padding: 8px 12px 0;
}

body.template-skystone .thebest-widget .thebest-compact-selector select {
    width: 100%;
    height: 28px;

    border: 1px solid #d5e6ea;
    border-radius: 0;

    background: #f9fcfd;

    color: #075f78;

    font-size: 7px;
}

/* --------------------------------------------------------------------------
   RESPONSIVO
   -------------------------------------------------------------------------- */

@media (max-width: 620px) {
    body.template-skystone .thebest-widget .thebest-avatar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.template-skystone .thebest-widget .thebest-rank-tabs {
        gap: 12px;
    }
}
