/* ==========================================================================
   SKYSTONE - PÁGINA RANKING V29
   Área central oficial: 535px.
   ========================================================================== */

body.template-skystone .ranking-page-card {
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Cabeçalho ------------------------------------------------------------- */

body.template-skystone .ranking-page-heading {
    margin: 0 0 16px;
    padding: 0 0 13px;
    border-bottom: 1px solid #dcebed;
}

body.template-skystone .ranking-page-heading > span {
    display: block;
    margin: 0 0 6px;
    color: #73a6b5;
    font-size: 6px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 1.25px;
}

body.template-skystone .ranking-page-heading h1 {
    margin: 0;
    color: #075f78;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.05;
}

body.template-skystone .ranking-page-heading p {
    margin: 8px 0 0;
    color: #6e949f;
    font-size: 8px;
    line-height: 1.35;
}

/* Ranking principal ----------------------------------------------------- */

body.template-skystone .ranking-main-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0 0 11px;
    padding: 0;
}

body.template-skystone .ranking-main-tabs a {
    min-height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border: 1px solid #d3e5e9;
    background: #f8fcfd;
    color: #5e8794;
    font-size: 6.5px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    box-sizing: border-box;
    transition:
        border-color .14s ease,
        background-color .14s ease,
        color .14s ease;
}

body.template-skystone .ranking-main-tabs a:hover {
    border-color: #a8d1da;
    color: #087b9b;
}

body.template-skystone .ranking-main-tabs a.active {
    border-color: #69bdd0;
    background: #eaf8fb;
    color: #076f8d;
}

/* Toolbar --------------------------------------------------------------- */

body.template-skystone .ranking-toolbar {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 7px 9px;
    border: 1px solid #d8e8eb;
    background: #f8fcfd;
    box-sizing: border-box;
}

body.template-skystone .ranking-period-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

body.template-skystone .ranking-period-tabs a {
    min-height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    border: 1px solid transparent;
    color: #70929d;
    font-size: 6px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

body.template-skystone .ranking-period-tabs a.active {
    border-color: #9dcdd6;
    background: #fff;
    color: #077796;
}

body.template-skystone .ranking-limit {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

body.template-skystone .ranking-limit label {
    color: #789ba5;
    font-size: 5.8px;
    font-weight: 700;
}

body.template-skystone .ranking-limit select {
    height: 27px;
    min-width: 70px;
    padding: 0 22px 0 8px;
    border: 1px solid #cfe1e6;
    border-radius: 0;
    outline: none;
    background: #fff;
    color: #315e6c;
    font-size: 6px;
    cursor: pointer;
}

/* Avatar / list toggle -------------------------------------------------- */

body.template-skystone .ranking-view-switch {
    display: flex;
    justify-content: flex-end;
    margin: 7px 0 10px;
}

body.template-skystone .ranking-view-buttons {
    display: inline-flex;
    border: 1px solid #d5e6e9;
    background: #f8fcfd;
}

body.template-skystone .ranking-view-buttons a {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0 9px;
    border-right: 1px solid #d5e6e9;
    color: #7698a3;
    font-size: 6px;
    font-weight: 700;
    text-decoration: none;
}

body.template-skystone .ranking-view-buttons a:last-child {
    border-right: 0;
}

body.template-skystone .ranking-view-buttons a.active {
    background: #eaf8fb;
    color: #087896;
}

body.template-skystone .ranking-view-icon {
    font-size: 8px;
    line-height: 1;
}

/* Selected title -------------------------------------------------------- */

body.template-skystone .ranking-selected-title {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 9px;
    padding: 0 10px;
    border-left: 2px solid #38b7cf;
    background: #f2f9fb;
    box-sizing: border-box;
}

body.template-skystone .ranking-selected-title > div {
    min-width: 0;
}

body.template-skystone .ranking-selected-title span {
    display: block;
    margin: 0 0 4px;
    color: #72a0ad;
    font-size: 5.5px;
    font-weight: 700;
    text-transform: uppercase;
}

body.template-skystone .ranking-selected-title strong {
    display: block;
    color: #075f78;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
    line-height: 1;
}

body.template-skystone .ranking-selected-title small {
    flex: 0 0 auto;
    padding: 4px 7px;
    border: 1px solid #cfe4e8;
    background: #fff;
    color: #6a929e;
    font-size: 5.5px;
    font-weight: 700;
}

/* Avatar mode ----------------------------------------------------------- */

body.template-skystone .ranking-avatar-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
}

body.template-skystone .ranking-player-card {
    min-width: 0;
    margin: 0;
    padding: 0 0 7px;
    overflow: hidden;
    border: 1px solid #d5e6e9;
    background: #fbfefe;
    text-align: center;
    box-sizing: border-box;
}

body.template-skystone .ranking-position {
    min-height: 23px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border-bottom: 1px solid #dcebed;
    background: #eef8fa;
    color: #638d99;
    font-size: 5.5px;
    font-weight: 700;
    box-sizing: border-box;
}

body.template-skystone .ranking-player-card:nth-child(1) .ranking-position {
    background: #fff7d9;
    color: #a67c00;
}

body.template-skystone .ranking-player-card:nth-child(2) .ranking-position {
    background: #f2f5f7;
    color: #71808a;
}

body.template-skystone .ranking-player-card:nth-child(3) .ranking-position {
    background: #fff0e2;
    color: #a96b34;
}

body.template-skystone .ranking-avatar-wrap {
    width: 100%;
    height: 89px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background:
        linear-gradient(
            145deg,
            #edf9fb,
            #dceff3
        );
}

body.template-skystone .ranking-avatar-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
}

body.template-skystone .ranking-avatar-wrap img.ranking-guild-mark {
    width: 56px;
    height: 56px;
    object-fit: contain;
    image-rendering: pixelated;
}

body.template-skystone .ranking-player-name {
    display: block;
    margin: 7px 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #075f78;
    font-size: 6.5px;
    font-weight: 700;
    line-height: 1.1;
}

body.template-skystone .ranking-player-score {
    display: block;
    margin: 4px 3px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #789ba6;
    font-size: 5.5px;
    line-height: 1.1;
}

/* List mode ------------------------------------------------------------- */

body.template-skystone .ranking-list-wrap {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #d6e6ea;
}

body.template-skystone .ranking-list-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
    table-layout: auto;
}

body.template-skystone .ranking-list-table th {
    height: 29px;
    padding: 0 8px;
    border-bottom: 1px solid #cfe2e6;
    background: #eef8fa;
    color: #4e7d8b;
    font-size: 5.8px;
    font-weight: 700;
    text-align: left;
    white-space: nowrap;
}

body.template-skystone .ranking-list-table td {
    height: 31px;
    padding: 4px 8px;
    border-bottom: 1px solid #e3edef;
    color: #567e8a;
    font-size: 6px;
    vertical-align: middle;
}

body.template-skystone .ranking-list-table tbody tr:last-child td {
    border-bottom: 0;
}

body.template-skystone .ranking-list-table tbody tr:hover td {
    background: #f8fcfd;
}

body.template-skystone .ranking-list-pos {
    width: 28px;
    text-align: center !important;
}

body.template-skystone .ranking-list-score {
    text-align: right !important;
    font-weight: 700;
    color: #087997 !important;
}

body.template-skystone .ranking-list-player {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

body.template-skystone .ranking-list-player strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #075f78;
    font-size: 6.3px;
}

body.template-skystone .ranking-list-guild-mark {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    object-fit: contain;
    image-rendering: pixelated;
}

body.template-skystone .ranking-top-1 td {
    background: rgba(255, 234, 143, .12);
}

body.template-skystone .ranking-top-2 td {
    background: rgba(206, 218, 225, .12);
}

body.template-skystone .ranking-top-3 td {
    background: rgba(232, 181, 130, .10);
}

/* Empty / Error --------------------------------------------------------- */

body.template-skystone .ranking-page-empty,
body.template-skystone .ranking-page-error {
    min-height: 62px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px dashed #d5e6e9;
    background: #f8fcfd;
    color: #7697a1;
    font-size: 7px;
    line-height: 1.35;
    text-align: center;
    box-sizing: border-box;
}

body.template-skystone .ranking-page-error {
    border-color: #eccfd2;
    background: #fff7f7;
    color: #b7555e;
}

/* Neutraliza CSS global antigo ----------------------------------------- */

body.template-skystone .ranking-page-card a,
body.template-skystone .ranking-page-card select,
body.template-skystone .ranking-page-card table,
body.template-skystone .ranking-page-card img {
    max-width: 100%;
}

body.template-skystone .ranking-page-card img {
    float: none;
}

@media (max-width: 620px) {
    body.template-skystone .ranking-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    body.template-skystone .ranking-limit {
        width: 100%;
        justify-content: flex-end;
    }

    body.template-skystone .ranking-avatar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.template-skystone .ranking-avatar-wrap {
        height: 120px;
    }
}
