:root {

    --trust-font-family: "Helvetica Neue", "Helvetica", "Arial", "sans-serif";
    --trust-font-weight: 400;
    --trust-font-bold: 500;
    --trust-font-size: 14px;

    --trust-theme-color: #00b67a;
    --trust-theme-accent: #005128;
    --trust-black-color: #000;
    --trust-grey-color: #6a6a67;
    --trust-empty-color: #dcdce6;

    --trust-stars-width: 112px;
    --trust-stars-height: 21px;
    --trust-stars-scale: 1;

}




/* Trust General */

.trust-author,
.trust-widget,
.trust-font {
    font-family: var(--trust-font-family, "Helvetica Neue", "Helvetica", "Arial", "sans-serif"), "Helvetica Neue", "Helvetica", "Arial", "sans-serif";
    font-weight: var(--trust-font-weight, 400);
    font-size: var(--trust-font-size, 14px);
    &.font-bold, .font-bold, strong, b {
        font-weight: var(--trust-font-bold, 500);
    }
    &.font-large, .font-large {
        font-size: 18px;
    }
}




/* Trust Logo */

.trust-logo:not(.no-fill) {
    svg path:not([fill]) {
        fill: currentColor;
    }
}





/* Trust Author */

.trust-author {
    display: flex;
    flex-direction: row;
    gap: 10px;

    &.inline-flex {
        display: inline-flex;
    }

    .author-avatar {
        overflow: hidden;
        position: relative;
        border-radius: 999px;
        height: 48px;
        width: 48px;

        img, svg {
            width: 100%;
            height: 100%;
        }

        & > span {
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            inset: 0;
            font-size: 1.5rem;
            color: var(--trust-black-color, currentColor);
            background-color: #dcdce6;
            background-color: #f1f1f1;


        }
    }

    .author-info {
        display: flex;
        flex-direction: column;
        justify-content: center;
        flex: 1 1;
        gap: 5px;

        /*.author-description:not(:last-child) {*/
        /*    margin: 0 0 5px 0;*/
        /*}*/

        .trust-stars {
            margin: 3px 0 0;
        }
    }

    .author-name,
    .author-description {
        line-height: 1;
    }

    .author-name {
        display: flex;
        color: var(--trust-black-color, currentColor);
        font-weight: 500;
        font-size: 15px;

        & > span {
            display: block;
            max-width: 240px;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            line-height: 1.1em;
        }

    }

    .author-description {
        display: flex;
        color: var(--trust-grey-color, currentColor);
    }

}







/* Trust Stars */

.trust-stars {
    position: relative;
    display: inline-flex;
    align-items: start;
    overflow: hidden;

    /*min-width: 84px;*/
    /*min-height: 15px;*/


    /*&.size-xs { --trust-stars-scale: 0.75; }*/
    &.size-xs { --trust-stars-scale: 0.8125; }
    &.size-sm { --trust-stars-scale: 1; }
    &.size-md { --trust-stars-scale: 1.5; }
    &.size-lg { --trust-stars-scale: 2; }
    &.size-xl { --trust-stars-scale: 2.5; }

    &[class*="size-"], &[data-trust-stars] {
        width: calc(var(--trust-stars-scale, 1) * var(--trust-stars-width, 112px));
        height: calc(var(--trust-stars-scale, 1) * var(--trust-stars-height, 21px));
    }

    &[data-trust-stars="5"] .stars-filled { width: 100%; }
    &[data-trust-stars="4"] .stars-filled { width: 80%; }
    &[data-trust-stars="3"] .stars-filled { width: 60%; }
    &[data-trust-stars="2"] .stars-filled { width: 40%; }
    &[data-trust-stars="1"] .stars-filled { width: 20%; }
    &[data-trust-stars] {

        .trust-svg {
            overflow: hidden;
            position: absolute;
            top: 0;
            left: 0;
            bottom: 0;
            z-index: 5;
            height: 100%;

            svg {
                height: 100%;
                width: auto;
            }
        }

    }

}




/* Trust Widget */

.trust-widget {
    position: relative;
    display: inline-flex;
    flex-wrap: wrap;
    min-width: 230px;
    min-height: 21px;

    &:not(.auto-height) {
        overflow: hidden;
        height: 21px;
    }

    & > a[target="_blank"] {
        position: absolute;
        font-size: 0;
        opacity: 0;
        inset: 0;
        z-index: 30;
        /*pointer-events: none;*/
    }

    .trust-section {
        display: inline-flex;
        flex-wrap: wrap;

        &.inline-block {
            display: inline-block;
        }
    }

    &.no-wrap {
        min-width: 300px;
        .trust-section {
            flex-wrap: nowrap;
        }
    }

    .trust-text,
    .trust-label {
        line-height: 21px;
    }

    .trust-text {
        display: inline-block;
        vertical-align: top;

        strong, span {
            display: inline-block;
        }

        &.is-primary {
            white-space: nowrap;
        }

        &.is-secondary {

            span {
                margin-right: 4px;
            }

        }
    }

    .trust-label {
        display: inline-flex;
    }

    .trust-logo {
        display: inline-block;
        vertical-align: top;
        width: 80px;
        height: 20px;
    }

    .trust-score-label {
        font-size: 18px;
        margin: 0 16px 4px 0;
    }

    .trust-stars {
        min-width: 106px;
        min-height: 20px;
        margin: 0 12px 4px 0;
    }



    &.variant-2 {
        @media all and (min-width: 576px) {
            & {
                min-width: 530px;
            }
        }
    }


    &.variant-4,
    &.variant-3 {

        --trust-font-bold: 700;

        flex-direction: column;
        min-width: 180px;
        height: auto;

        .trust-logo,
        .trust-stars {
            margin-bottom: 8px;
        }

        .trust-logo {
            aspect-ratio: 4;
            width: 136px;
            height: auto;

            .variant-3.size-sm & {
                width: 90px;
            }
        }

        .trust-stars {
            &:not([class*="size-"]) {
                width: 224px;
                height: 42px;
            }
        }

        .trust-section {
            display: inline-block;
        }

        .trust-text {
            &.is-divider {
                margin: 0 2px;
            }
        }

    }



    &.variant-4 {
        min-width: 110px;

        .trust-logo {
            width: 100%;
        }

        .trust-stars {
            margin: 0;
        }

    }



    /*outline: 1px solid red;*/


}








@media all and (max-width: 440px) {

    .trust-widget.variant-1 {
        /*--trust-stars-width: 112px;*/
        /*--trust-stars-height: 21px;*/
        --trust-stars-scale: 0.75;

        min-height: 16px;

        &:not(.auto-height) {
            height: 16px;
        }

        .trust-text, .trust-label {
            font-size: 13px;
            line-height: 16px;
        }

        .trust-stars {
            min-width: 0;
            min-height: 0;
            margin: 0 8px 4px 0;
        }

        .trust-score-label {
            font-size: 14px;
            line-height: 16px;
            margin: 0 8px 4px 0;
        }

        .trust-logo {
            width: 75px;
            height: 16px;
            margin-top: -2px;
        }

    }


}




