@use "../base/mixins";

/*----------------------------
Footer
----------------------------*/

.cwp-dynamic-footer {
    ul {
        margin-left: 0;
    }

    &.cwp-enable-overlay {
        position: relative;
        z-index: 1;

        &:after {
            position: absolute;
            content: '';
            left: 0;
            top: 0;
            width: 100%;
            height: 100%;
            z-index: -1;
        }
    }

    .cwp-top-footer {
        &.cwp-enable-overlay {
            position: relative;
            z-index: 1;

            &:after {
                position: absolute;
                content: '';
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                z-index: -1;
            }
        }
    }

    .cwp-main-footer {
        &.cwp-enable-overlay {
            position: relative;
            z-index: 1;

            &:after {
                position: absolute;
                content: '';
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                z-index: -1;
            }
        }
    }

    .cwp-bottom-footer {
        &.cwp-enable-overlay {
            position: relative;
            z-index: 1;

            &:after {
                position: absolute;
                content: '';
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                z-index: -1;
            }
        }
    }
}

.cwp-footer-copyright {
    font-size: 13px;
}

.cwp-footer-navigation {
    display: flex;

    &.cwp-flex-align-center-mobile {
        text-align: center;

        .cwp-horizontal-menu {
            text-align: center;
        }
    }

    &.cwp-flex-align-right-mobile {
        text-align: right;

        .cwp-horizontal-menu {
            text-align: right;
        }
    }

    &.cwp-flex-align-left-mobile {
        text-align: left;

        .cwp-horizontal-menu {
            text-align: left;
        }
    }

    @include mixins.respond-above(sm) {
        &.cwp-flex-align-center-tablet {
            text-align: center;

            .cwp-horizontal-menu {
                text-align: center;
            }
        }

        &.cwp-flex-align-right-tablet {
            text-align: right;

            .cwp-horizontal-menu {
                text-align: right;
            }
        }

        &.cwp-flex-align-left-tablet {
            text-align: left;

            .cwp-horizontal-menu {
                text-align: left;
            }
        }
    }

    @include mixins.respond-above(md) {
        &.cwp-flex-align-center-desktop {
            text-align: center;

            .cwp-horizontal-menu {
                text-align: center;
            }
        }

        &.cwp-flex-align-right-desktop {
            text-align: right;

            .cwp-horizontal-menu {
                text-align: right;
            }
        }

        &.cwp-flex-align-left-desktop {
            text-align: left;

            .cwp-horizontal-menu {
                text-align: left;
            }
        }
    }

    @include mixins.respond-above(sm) {}

    ul {
        list-style-type: none;

        li {
            a {}

            .sub-menu {
                display: block;
                padding-left: 15px;
            }
        }
    }
}

.cwp-horizontal-menu {
    list-style: none;

    li {
        display: inline-block;

        a {
            display: block;
        }
    }
}

.cwp-vertical-menu {
    list-style: none;

    li,
    a {
        display: block;
    }
}

.cwp-bottom-footer {
    .grid-row {
        align-items: center;
    }
}

.cwp-boxed-width-footer {
    .cwp-dynamic-footer {
        max-width: 1170px;
        margin: 0 auto;
    }
}

.cwp-fluid-width-footer {
    .cwp-dynamic-footer {
        margin: 0 auto;

        .grid-container {
            width: 100%;
            max-width: 100%;
        }
    }
}

.cwp-parallax-footer {
    .cwp-dynamic-footer {
        @include mixins.respond-above(md) {
            position: fixed;
            left: 0;
            right: 0;
            width: 100%;
            margin: 0 auto;
            bottom: 0;

            .cwp-scrollbar-inner {
                overflow: auto;
            }
        }
    }
}

.cwp-sticky-footer-wrapper {
    display: none;
}

.cwp-sticky-footer {
    .cwp-dynamic-footer {
        .cwp-sticky-footer-wrapper {
            overflow: hidden;
            display: block;
            background: rgba(0, 0, 0, .2);

            &.position-right {
                flex-direction: row-reverse;
            }

            ul {
                li {
                    display: inline-block;
                }
            }

            .cwp-sticky-footer-btn {
                padding: 10px 15px;
                z-index: 101;
                cursor: pointer;
                float: left;
            }

            .cwp-sticky-footer-content {
                width: 100%;

                .grid-container {
                    width: 100%;
                    margin: 0;

                    .grid-row {
                        align-items: center;
                    }
                }

                .cwp-sticky-footer-navigation {
                    display: flex;
                }
            }
        }

        @include mixins.respond-above(sm) {
            position: fixed;
            left: 0;
            right: 0;
            width: 100%;
            margin: 0 auto;
            z-index: 101;
            transition: bottom 0.5s ease-in-out 0s;

            .cwp-sticky-footer-btn {
                i {
                    transition: all 0.5s ease-in-out 0s;
                }
            }

            &.open-footer {
                bottom: 0 !important;

                .cwp-sticky-footer-btn {
                    i {
                        transition: all 0.5s ease-in-out 0s;
                        transform: rotate(180deg);
                    }
                }
            }

            .cwp-sticky-footer-wrapper {
                display: flex;
                align-items: center;
            }
        }
    }
}