@import url('https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

.main-menu-wrapper {
    >.container {
        display: flex;
        align-items: stretch;
    }

    .main-menu-block {
        display: flex;
        flex: 1;
        padding: 0;
    }
}

.main-menu {
    text-align: left;
    padding: 0 20px;

    li {
        a {
            font-weight: 400;
        }

        &.selected a {
            color: rgb(51, 122, 183);
            font-weight: 800;
        }
    }
}

.main-menu--mandate-item {
    a {
        color: #00828F;
        text-transform: uppercase;
        text-decoration: none;
        line-height: 50px;
        font-family: "Ubuntu Condensed";
        font-size: 16px;
        font-size: 1.6rem;
        white-space: nowrap;
        padding: 6px;
        margin-top: 10px;

        &:before {
            content: '';
            padding-left: 25px;
            background-image: url("../images/idle.svg");
            background-repeat: no-repeat;
            background-size: contain;
            transition: all 0.4s ease;
            width: 30px;
            height: 30px;
        }

        &:hover {
            &:before {
                background-image: url("../images/hover.svg");
            }
        }

        &::after {
            content: '';
            padding-right: 30px;
            background-image: url("../images/arrow.svg");
            background-repeat: no-repeat;
            background-size: 18px 10px;
            background-position: 15px 5px;
            width: 30px;
            height: 30px;
        }
    }
}

.main-menu--elections-item {
    position: relative;
    transition: all 0.4s ease;
    display: flex;
    background-color: #EBEBEB;

    select {
        display: none;
    }

    .elections-container {
        position: relative;

        >a {
            color: #000;
            font-size: 14px;
            font-family: "Ubuntu", sans-serif;
            font-weight: 700;
            line-height: 24px;
            text-transform: uppercase;
            display: flex;
            height: 100%;
            align-items: center;
            transition: all 0.4s ease;
            padding: 0px 45px 0px 13px;
            background-image: url("../images/arrow-down-black.svg");
            background-repeat: no-repeat;
            background-position: right 13px center;
            width: 340px;

            &:hover,
            &:active,
            &:focus {
                text-decoration: none;
            }
        }

        &:hover,
        &.toggled {
            background-color: #00828F;

            >a {
                color: #fff;
                background-image: url("../images/arrow-down.svg");
            }
        }
    }
}

.sub-menu-wrapper {
    background: #EBEBEB;

    ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
        display: flex;
        width: 100%;
        justify-content: flex-end;
    }

    li {
        display: inline-block;

        a {
            text-decoration: none;
            padding: 13px;
            color: #000;
            font-family: "Ubuntu Condensed";
            font-size: 16px;
            font-style: normal;
            font-weight: 400;
            line-height: 24px;
            text-transform: uppercase;
            display: flex;

            &:hover,
            &:active,
            &:focus {
                text-decoration: none;
            }
        }

        &.selected a {
            color: rgb(51, 122, 183);
            font-weight: 800;
        }
    }
}

#local-elections-wrapper {
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s ease;
    overflow: hidden;
    position: absolute;
    width: 100%;
    z-index: 9;
    max-height: 405px;

    &.toggled {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
        overflow-y: auto;
        box-shadow:
            0 20px 40px rgba(0, 0, 0, 0.08),
            0 10px 20px rgba(0, 0, 0, 0.06),
            0 5px 10px rgba(0, 0, 0, 0.05);
    }
}

#local-elections-list {
    padding: 13px 0;
    list-style: none;
    background: #FFF;
    margin-bottom: 0;

    li {
        display: flex;
        align-items: center;
        align-self: stretch;

        a {
            padding: 5px 13px;
            text-transform: uppercase;

            &:hover,
            &:active,
            &:focus {
                text-decoration: none;
            }
        }

        &.selected {
            a {
                color: rgb(51, 122, 183);
            }
        }
    }

    .election-label {
        padding: 5px 13px;
        text-transform: uppercase;
        color: #00828F;
        font-family: "Ubuntu", sans-serif;
        font-weight: 700;
        font-size: 14px;
    }

    .election-item {
        a {
            color: #000;
            font-family: "Ubuntu Condensed";
            font-size: 16px;
        }
    }
}

@media screen and (max-width: 991px) {
    .main-menu-block {
        flex-direction: column;

        .main-menu {
            padding: 0;

            li {
                padding-left: 0;
                padding-right: 40px;
            }
        }

    }
}

@media screen and (max-width: 767px) {
    .main-menu-wrapper {
        padding: 0;

        >.container {
            flex-direction: column;
            padding: 0;
        }

        .main-menu-block {
            flex-direction: column;
            padding: 0 25px;
        }
    }

    .main-menu--mandate-item {
        a {
            line-height: 24px;
            display: block;
            margin-bottom: 5px;
        }
    }

    .main-menu--elections-wrapper {
        padding: 0 25px;
        margin-top: 10px;
    }

    .main-menu--elections-item {
        select {
            display: block;
            margin-top: 13px;
        }

        margin-top: 10px;
        flex-direction: column;
        padding: 0 25px;

        .elections-container {
            display: none;
        }
    }

    .sub-menu-wrapper {
        padding: 0;

        ul {
            display: none;
        }
    }
}