@use "../../styles/variables";

@mixin statistic-color($color) {
    color: $color;
    &.thy-statistic-card {
        background-color: rgba($color, 0.05);
        border-color: $color;
    }
}

@mixin statistic-size($size, $suffixSize, $titleSize) {
    font-size: $size;
    .thy-statistic-content-suffix {
        font-size: $suffixSize;
    }
    .thy-statistic-title {
        font-size: $titleSize;
    }
}

.thy-statistic {
    .thy-statistic-content {
        line-height: 1.5;
        &-value {
            font-family: variables.$font-family-statistics-number;
        }
        &-prefix,
        &-suffix {
            display: inline-block;
        }
        &-prefix {
            margin-right: 4px;
        }
        &-suffix {
            margin-left: 4px;
        }
    }

    .thy-statistic-title {
        font-size: variables.$font-size-sm;
        color: variables.$gray-600;
    }
}
.thy-statistic-default {
    @include statistic-size(
        variables.$statistic-size-default,
        variables.$statistic-suffix-size-default,
        variables.$statistic-title-size-default
    );
}

.thy-statistic-card {
    display: block;
    border-radius: 3px;
    border-left: 3px solid;
    padding: 20px 40px;
}

.thy-statistic-primary {
    @include statistic-color(variables.$primary);
}

.thy-statistic-success {
    @include statistic-color(variables.$success);
}

.thy-statistic-warning {
    @include statistic-color(variables.$warning);
}

.thy-statistic-danger {
    @include statistic-color(variables.$danger);
}

.thy-statistic-info {
    @include statistic-color(variables.$info);
}
