@import '~@equitysim/react-uikit/dist/styles/styleguide';
%ranking-grid {
    display: grid;
    grid-template-columns: 1fr;
    padding: 0 v-space(2);
    @media screen and (min-width: $screen-large) {
        grid-template-columns: var(--container-padding-h) 1fr 2fr 4fr 3fr var(
                --container-padding-h
            );
        padding: v-space(3) 0;
    }
    grid-gap: 0;
}

.c-leaderboard-table-body {
    &__ranking-template {
        @extend %ranking-grid;
        border: 1px solid $seafoam;

        & > p:nth-child(1),
        & > p:nth-child(2),
        & > div:nth-child(6) {
            @media screen and (max-width: $screen-large - 1px) {
                display: none;
            }
        }
    }

    &__name {
        font-weight: $font-weight-bold;
        margin-top: v-space(1);

        &--clickable {
            @extend %link;
        }
    }
    &__label {
        @extend %heading-xs;
        margin-bottom: v-space(1);
        margin-top: v-space(3);

        @media screen and (min-width: $screen-large) {
            margin-bottom: v-space(3);
            margin-top: 0;
        }
    }
    &__graph {
        height: v-space(8);
    }
    &__portfolio-return {
        @media screen and (min-width: $screen-large) {
            text-align: right;
        }
    }

    &__portfolio-approach {
        font-size: 1.4rem;
        font-weight: $font-weight-light;
        color: $grey-60;
    }

    &__historic-rate-v-return {
        p {
            @extend %heading-xs;
            margin-bottom: 0;
        }
        span {
            font-size: 1.2rem;
            font-weight: $font-weight-bold;
            color: $grey-50;
            &:first-of-type {
                margin-right: v-space(1);
            }
        }
        div:last-child {
            text-align: right;
        }
    }

    &__avg-return-rate-swatch,
    &__volatility-range-swatch {
        display: inline-block;
        margin-right: v-space(1);
        vertical-align: middle;
    }

    &__avg-return-rate-swatch {
        background-color: $seafoam;
        height: 0.2rem;
        width: v-space(2);
    }

    &__volatility-range-swatch {
        background-color: $seafoam-20;
        border: 0.1rem solid $seafoam-40;
        height: v-space(2);
        width: v-space(2);
    }

    &__statistics {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        min-width: 0;
        min-height: 0;
        margin: 1.2rem 0 0 v-space(4);
        @media screen and (max-width: $screen-large - 1px) {
            margin: 1.2rem 0 0 0;
        }
        dd,
        dt {
            margin: 0 0 1.4rem 0;
            padding: 0;
            display: inline-block;
            text-align: left;
        }
        dt {
            @extend %heading-xs;
            color: $grey-60;
        }

        dd {
            font-weight: 500;
            color: $grey-50;
            font-style: normal;
            font-family: $numeric-font-family;
            text-align: right;
        }
    }
}
