// Var
:root {
    --transition: all 0.3s ease 0s;
    --whiteColor: #ffffff;
    --primaryColor: #0073FF;
    --primaryFgColor: #ffffff;
    --secondaryColor: #171A1E;
    --secondaryFgColor: #ffffff;
    --bodyColor: #616C74;
    --titleColor: #121213;
    --borderColor: #E5E5E5;
    --shadeColor: #F8F8F9;
}
$transition: var(--transition);

// Style
.ultimate-tag-cloud-container {
    .ultimate-tag-cloud-words {
        &:not(.swiper-wrapper) {
            flex-wrap: wrap;
            gap: 15px;
            display: flex;
            align-items: center;
            .tag-word-wrap {
                position: relative;
                a {
                    display: block;
                    position: relative;
                    transition: $transition;
                }
                &:not(.rand-color) {
                    --colorNormal: 104, 177, 222;
                    --colorHigh: 8, 115, 180;
                }
                &:not(.rand-size) {
                    --randSize: 16px;
                }
            }
        }
        .swiper-slide {
            a {
                width: 100%;
                height: 100%;
            }
        }
    }
    &.style-default {
        .ultimate-tag-cloud-words {
            .tag-word-wrap {
                a {
                    color: rgb(var(--colorNormal));
                    font-size: var(--randSize);
                    &:hover {
                        color: rgb(var(--colorHigh));
                    }
                }
            }
        }
    }
    &.style-sphere {
        .ultimate-tag-cloud-words {
            .tag-word-wrap {
                transform: rotate3d(1, 1, 0.5, 15deg);
                -webkit-transform: rotate3d(1, 1, 0.5, 15deg);
                a {
                    color: rgb(var(--colorHigh));
                    font-size: var(--randSize);
                    background-color: rgba(var(--colorNormal), 0.2);
                    border: 1px solid rgb(var(--colorNormal));
                    padding: 5px 7px;
                    border-radius: 5px;
                    &:hover {
                        background-color: rgba(var(--colorNormal), 0.5);
                    }
                }
            }
        }
    }
    &.style-label {
        .ultimate-tag-cloud-words {
            .tag-word-wrap {
                a {
                    padding: 7px 13px 7px 30px;
                    transition: $transition;
                    background-color: rgba(var(--colorNormal), 0.2);
                    color: rgb(var(--colorHigh));
                    filter: brightness(80%);
                    font-size: var(--randSize);
                    clip-path: polygon(0 50%, 10% 0, 100% 0, 100% 100%, 10% 100%);
                    &:hover {
                        background-color: rgba(var(--colorNormal), 0.5);
                    }
                }
                &:before {
                    content: '';
                    position: absolute;
                    top: 50%;
                    left: 15px;
                    transform: translateY(-50%);
                    width: 5px;
                    height: 5px;
                    border-radius: 50%;
                    background-color: #fff;
                    z-index: 1;
                }
            }
        }
    }
    &.style-block {
        .ultimate-tag-cloud-words {
            .tag-word-wrap {
                a {
                    padding: 5px 7px;
                    transition: $transition;
                    background-color: rgba(var(--colorNormal), 0.2);
                    color: rgb(var(--colorHigh));
                    border: 1px solid rgb(var(--colorNormal));
                    filter: brightness(80%);
                    font-size: var(--randSize);
                    &:hover {
                        background-color: rgba(var(--colorNormal), 0.5);
                    }
                }
            }
        }
    }
    &.style-ribbon {
        .ultimate-tag-cloud-words {
            align-items: baseline;
            .tag-word-wrap {
                position: relative;
                overflow: hidden;
                padding-top: 15px;
                a {
                    padding: 10px 20px 10px 40px;
                    transition: $transition;
                    background-color: rgba(var(--colorNormal), 0.7);
                    color: rgb(var(--colorHigh));
                    font-size: var(--randSize);
                    &:hover {
                        background-color: rgba(var(--colorNormal), 0.9);
                    }
                }
                &:after,
                &:before {
                    position: absolute;
                    content: '';
                    top: 0;
                    left: -1px;
                    bottom: 0;
                    width: 40px;
                    background-color: rgb(var(--colorNormal));
                    pointer-events: none;
                }
                &:after {
                    clip-path: polygon(0 0, 100% 100%, 0 100%);
                    z-index: 2;
                }
                &:before {
                    top: 15px;
                    filter: brightness(80%);
                    clip-path: polygon(0 100%, 0 0, 100% 0);
                    z-index: 1;
                }
            }
        }
        &.ribbon-style1 {
            .ultimate-tag-cloud-words {
                .tag-word-wrap {
                    padding-top: 15px;
                    a {
                        clip-path: polygon(90% 0, 100% 100%, 0 100%, 0 0);
                        padding: 10px 25px 10px 40px;
                    }
                }
            }
        }
        &.ribbon-style2 {
            .ultimate-tag-cloud-words {
                .tag-word-wrap {
                    padding-top: 15px;
                    a {
                        clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%);
                    }
                }
            }
        }
        &.ribbon-style3 {
            .ultimate-tag-cloud-words {
                .tag-word-wrap {
                    padding-top: 15px;
                    a {
                        border-radius: 0 100px 100px 0;
                    }
                }
            }
        }
    }
}

// Slider Configuration
.ultimate-tag-cloud {
    .swiper {
        width: 100%;
        height: 100%;
        position: relative;
        &.swiper-vertical {
            .swiper-wrapper {
                height: 100% !important;
            }
        }
    }
    .swiper-wrapper {
        padding-bottom: 30px;
    }
    .swiper-pagination {
        text-align: center;
        bottom: 0 !important;
        line-height: 1;
        .swiper-pagination-bullet {
            width: 15px;
            height: 15px;
            display: inline-block;
            font-size: 0;
            line-height: unset;
            padding: unset;
            outline: none;
            background: transparent;
            border: 1px solid var(--borderColor);
            transition: all 0.3s ease-in;
            -webkit-transition: all 0.3s ease-in;
            border-radius: 15px;
            opacity: 1;
            &.swiper-pagination-bullet-active {
                background: var(--primaryColor);
                border-color: var(--primaryColor);
            }
        }
        &.swiper-pagination-progressbar {
            overflow: hidden;
        }
        &.swiper-pagination-custom,
        &.swiper-pagination-fraction {
            pointer-events: none;
        }
    }
    &.swiper-dots-2 {
        .swiper-pagination {
            .swiper-pagination-bullet {
                width: 30px;
                height: 30px;
                position: relative;
                border: 1px solid transparent;
                background: transparent;
                transition: all 0.3s ease 0s;
                &:after {
                    content: "";
                    width: 10px;
                    height: 10px;
                    border-radius: 50%;
                    background: var(--titleColor);
                    position: absolute;
                    left: 50%;
                    top: 50%;
                    transform: translate(-50%, -50%);
                    transition: all 0.3s ease 0s;
                }
                &:hover,
                &.swiper-pagination-bullet-active {
                    border-color: var(--primaryColor);
                    &:after {
                        background: var(--primaryColor);
                    }
                }
            }
        }
    }
    .swiper-button-next,
    .swiper-button-prev {
        position: absolute;
        transition: all 0.3s ease 0s;
        z-index: 9;
        font-size: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        color: var(--primaryColor);
        width: 50px;
        height: 50px;
        border: 1px solid var(--primaryColor);
        transition: var(--transition);
        border-radius: 50%;
        top: 50%;
        transform: translateY(-50%);
        margin: 0;
        outline: none !important;
        &:after {
            font-family: "remixicon" !important;
            line-height: 50px;
            font-size: 18px;
            margin: 0;
            display: inline-block;
            text-align: center;
            color: inherit;
            opacity: 1 !important;
            line-height: normal !important;
            transition: var(--transition);
        }
        &:hover {
            background: var(--primaryColor);
            border-color: var(--primaryColor);
            color: var(--titleColor);
            &:after {
                color: var(--whiteColor);
            }
        }
    }
    .swiper-button-prev {
        left: 10px;
        &:after {
            content: "\ea60";
        }
    }
    .swiper-button-next {
        right: 10px;
        &:after {
            content: "\ea6c";
        }
    }
    &.nav-style-2 {
        .swiper-btn-wrapper {
            position: relative;
            display: inline-flex;
            border: 1px solid var(--borderColor);
            border-radius: 100px;
            padding: 6px;
            gap: 10px;
            align-items: center;
            background: var(--shadeColor);
            z-index: 2;
            .swiper-button-next,
            .swiper-button-prev {
                position: unset;
                transform: unset;
            }
        }
    }
    &.nav-icon-2 {
        .swiper-button-prev::after {
            content: "\ea5f" !important;
        }
        .swiper-button-next::after {
            content: "\ea6b" !important;
        }
    }
    &.nav-icon-3 {
        .swiper-button-prev::after {
            content: "\f307" !important;
        }
        .swiper-button-next::after {
            content: "\f309" !important;
        }
    }
    &.nav-icon-4 {
        .swiper-button-prev::after {
            content: "\ea64" !important;
        }
        .swiper-button-next::after {
            content: "\ea6e" !important;
        }
    }
    &.nav-icon-5 {
        .swiper-button-prev::after {
            content: "\f493" !important;
        }
        .swiper-button-next::after {
            content: "\f495" !important;
        }
    }
    .autoplay-progress {
        position: absolute;
        right: 16px;
        bottom: 16px;
        z-index: 2;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        color: var(--primaryColor);
        svg {
            --progress: 0;
            position: absolute;
            left: 0;
            top: 0px;
            z-index: 1;
            width: 100%;
            height: 100%;
            stroke-width: 2px;
            stroke: var(--primaryColor);
            fill: none;
            stroke-dashoffset: calc(125.6px * (1 - var(--progress)));
            stroke-dasharray: 125.6;
            transform: rotate(-90deg);
            circle.normal {
                stroke: #fff;
                stroke-dashoffset: 0 !important;
            }
        }
        span {
            position: relative;
            z-index: 2;
        }
    }
    .swiper-pagination-progressbar {
        background: #e7e5e5;
        .swiper-pagination-progressbar-fill {
            background: var(--primaryColor);
        }
        &.swiper-pagination-vertical {
          transform: scaleY(-1);
        }
    }
    .swiper-scrollbar {
        background: #e7e5e5;
        cursor: pointer;
        .swiper-scrollbar-drag {
            background: var(--primaryColor);
            cursor: grab;
            &:active {
                cursor: grabbing;
            }
        }
        &.swiper-scrollbar-horizontal {
            width: 100%;
            left: 0;
            bottom: 0;
        }
    }
    &.effect-curve {
        overflow-x: clip;
        .swiper {
            overflow: visible;
            .swiper-wrapper {
                transition-timing-function: linear !important;
            }
        }
    }
}