/**
 * Herbalist
 * Herbalist – is a website template created for selling the cannabis, medical marijuana and CBD products, cannabis blogging and others
 * Exclusively on https://1.envato.market/herbalist-html
 *
 * @encoding        UTF-8
 * @version         1.0.0
 * @copyright       (C) 2018 - 2021 Merkulove ( https://merkulov.design/ ). All rights reserved.
 * @license         Envato License https://1.envato.market/KYbje
 * @contributors    Lamber Lilit (winter.rituel@gmail.com)
 * @support         help@merkulov.design
 **/
// shop sidebar component

.widgets {
    &-item {
        margin-bottom: 40px;
        color: $primary;

        &:last-of-type {
            margin-bottom: 0;
        }

        &_header {
            margin-bottom: 20px;

            .leaf {
                margin-right: 10px;
            }
        }

        &_nav {
            margin-bottom: -15px;

            .nav-link {
                transition: color .3s ease-in-out;
                display: inline-block;
                margin-bottom: 15px;
                line-height: 1 !important;

                &:hover {
                    color: $secondary;
                }

                .icon {
                    color: $primaryHighlight;
                }

                &[aria-expanded="true"] {
                    .icon {
                        transform: rotate(90deg);
                    }

                    + .nav-list--main {
                        padding-bottom: 15px;
                    }
                }

                .icon {
                    margin-right: 10px;
                    transition: all .3s ease-in-out;
                }

                &[data-level="first"] {
                    font-family: $accentFont;
                    font-size: 17px;
                    line-height: 1.3;
                    font-weight: 700;
                    margin-bottom: 15px;

                    &[aria-expanded="true"],
                    &:hover,
                    .icon {
                        color: $secondary;
                    }
                }

                &[data-level="second"] {
                    margin-left: 10px;
                }

                &[data-level="third"] {
                    margin-left: 20px;
                }

                &[data-level="fourth"] {
                    margin-left: 40px;
                }
            }
        }

        &--recent {
            .list {
                &-item {
                    margin-bottom: 30px;

                    &:hover .media img {
                        transform: scale(1.1);
                    }

                    &:last-of-type {
                        margin-bottom: 0;
                    }

                    .media {
                        border-radius: 8px;
                        overflow: hidden;
                        margin-bottom: 10px;
                        height: 200px;

                        img {
                            transition: all .5s ease-in-out;
                        }
                    }

                    .title {
                        display: inline-block;
                        margin-bottom: 5px;
                        font-size: 17px;
                        line-height: 1.3;
                        font-weight: 700;
                        font-family: $accentFont;
                    }

                    .metadata {
                        font-weight: 600;
                        line-height: 1;
                        color: $text;
                        font-size: 14px;

                        .icon {
                            margin-right: 10px;
                        }
                    }
                }
            }
        }

        &--tags {
            .list {
                margin-top: -10px;

                &-item {
                    .link {
                        font-weight: 500;
                        display: block;
                        margin: 10px 10px 0 0;
                        padding: 0 20px;
                        height: 40px;
                        border: 1px solid $primaryHighlight;
                        border-radius: 24px;
                        transition: all .3s ease-in-out;

                        &:hover, &:focus {
                            border-color: $secondary;
                            color: $secondary;
                        }
                    }
                }
            }
        }

        &--comments {
            .list {
                &-item {
                    margin-bottom: 15px;

                    &:last-of-type {
                        margin-bottom: 0;
                    }

                    .icon {
                        color: $secondary;
                        margin-right: 10px;
                        position: relative;
                        top: 2px;
                    }

                    .comment {
                        .author {
                            font-weight: 600;
                        }
                    }
                }
            }
        }

        &--archives {
            .list {
                &-item {
                    margin-bottom: 15px;

                    &:last-of-type {
                        margin-bottom: 0;
                    }

                    .month {
                        &_name {
                            font-family: $accentFont;
                            font-weight: 700;
                            line-height: 1;
                        }

                        .icon {
                            color: $secondary;
                            margin-right: 10px;
                        }
                    }
                }
            }
        }

        &--calendar {
            font-family: $accentFont;

            .table {
                width: 100%;
                text-align: center;

                &_header {
                    background: $pastelYellow;
                    font-weight: 700;
                    padding: 12px 0;
                    margin-bottom: 30px;
                }

                &_body {
                    color: $text;

                    &-week {
                        &_day {
                            font-weight: 700;
                            padding-bottom: 10px;
                        }
                    }

                    &-dates {
                        &_date {
                            padding: 5px 0;
                            transition: all, .3s ease-in-out;
                            cursor: pointer;
                            width: 38px;
                            font-family: $bodyFont;

                            &--current, &:hover {
                                border-radius: 8px;
                                background: #0DA574;
                                color: #fff;
                                font-weight: 700;
                            }
                        }
                    }
                }
            }

            .navigation {
                margin-top: 30px;
                color: #808385;
                font-weight: 700;
                line-height: 1;

                &_control {
                    &--prev {
                        .icon {
                            margin-right: 10px;
                            transition: margin-right .3s ease-in-out;
                        }

                        &:hover, &:focus {
                            .icon {
                                margin-right: 5px;
                            }
                        }
                    }

                    &--next {
                        .icon {
                            margin-left: 10px;
                            transition: margin-left .3s ease-in-out;
                        }

                        &:hover, &:focus {
                            .icon {
                                margin-left: 5px;
                            }
                        }
                    }
                }
            }
        }

        &--sale {
            position: relative;
            background: $pastelYellow;
            border-radius: 24px;
            overflow: hidden;
            padding: 30px;

            .media {
                position: absolute;
                right: -30px;
                bottom: 0;
                height: 152px;
                width: 158px;
                z-index: 1;

                .leaf {
                    position: absolute;
                    bottom: 0;
                    filter: drop-shadow(2px 2px 10px rgba(0, 0, 0, 0.15));
                }
            }

            .content {
                position: relative;
                z-index: 10;

                &_header {
                    margin-bottom: 5px;
                }

                &_text {
                    margin-bottom: 20px;
                    font-size: 14px;
                }

                &_timer {
                    margin-bottom: 20px;

                    .timer {
                        &_block {
                            border: 1px solid $primaryHighlight;
                            border-radius: 8px;
                            padding: 10px;
                            color: $secondary;
                            font-family: $accentFont;
                            font-weight: 700;
                            font-size: 20px;
                            line-height: 1.3;
                        }

                        &_separator {
                            margin: 0 10px;

                            .dot {
                                background: $primaryHighlight;
                                width: 3px;
                                height: 3px;
                                border-radius: 50%;
                                display: block;

                                &:first-of-type {
                                    margin-bottom: 10px;
                                }
                            }
                        }
                    }
                }
            }
        }

        .form {
            &--search {
                position: relative;

                .field {
                    width: 100%;
                    border: 1px solid #C8C8C8;
                    border-radius: 24px;
                    padding: 10px 120px 10px 20px;
                    height: 48px;
                    transition: all .3s ease-in-out;

                    &::placeholder {
                        transition: opacity .3s ease-in-out;
                    }

                    &:focus {
                        border-color: $primary;

                        &::placeholder {
                            opacity: 0;
                        }
                    }
                }

                .btn {
                    position: absolute;
                    top: 0;
                    bottom: 0;
                    right: 0;
                }
            }
        }
    }
}

// media queries

@media screen and (min-width: 374.98px) {
    .widgets {
        &-item {
            &--sale {

                .media {
                    width: 198px;
                }
            }
        }
    }
}

@media screen and (min-width: 575.98px) {
    .widgets {
        &-item {
            &--recent {
                .list {
                    &-item {
                        .media {
                            margin-right: 20px;
                            margin-bottom: 0;
                            width: 117px;
                            height: 90px;
                        }

                        .title {
                            max-width: 270px;
                        }

                    }
                }
            }
        }
    }
}

@media screen and (min-width: 767.98px) {
    .widgets {
        &-item {
            &--recent {
                .list {
                    &-item {
                        .media {
                            min-width: 100px;
                            min-height: 100px;

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

                    }
                }
            }
        }
    }
}

@media screen and (min-width: 991.98px) {
    .widgets {
        &-item {
            margin-bottom: 60px;

            &--sale {

                .content-timer {
                    .timer_block {
                        padding: 16px;
                    }
                }
            }

            &--calendar {
                .navigation {
                    margin-top: 40px;
                }
            }

            &--recent {
                .list {
                    &-item {
                        .wrapper {
                            .title {
                                margin-bottom: 15px;
                            }
                        }
                    }
                }
            }

        }
    }
}

@media screen and (min-width: 1199.98px) {
    .widgets {
        &-item {
            &--tags {
                .list {
                    margin-top: -20px;

                    &-item {
                        .link {
                            margin: 20px 20px 0 0;
                        }
                    }
                }
            }
        }
    }
}