@import "../scss/vars";

$transition: background-color 0.3s ease, color 0.3s ease;

.menu {

    &__list {
        background-color: white;
        color: $dark-grey;
        margin: 0;
        padding: 0;
        list-style-type: none;
        cursor: pointer;
    }

    &__list-item {
        padding: 8px;
        transition: $transition;

        &_selected,
        &:hover {
            background-color: $primary-red;
            color: white;
        }
    }

    &__icon {
        margin-right: 8px;
        margin-bottom: 2px;
    }

    &_secondary {
        .menu__list-item_selected,
        .menu__list-item:hover {
            background-color: $secondary-blue;
        }

        .menu__header {
            padding: 8px;
            background-color: $primary-blue;
            color: white;
            font-size: 16px;
            border-top-right-radius: 4px;
            border-top-left-radius: 4px;
        }
    }

    &_navigation {
        text-align: center;
        background-color: transparent;

        .menu__list {
            background-color: transparent;
            display: inline-block;
        }

        .menu__list-item {
            background-color: white;
            cursor: pointer;
            display: inline-block;
            padding: 8px;

            &:first-child {
                border-top-left-radius: 4px;
                border-bottom-left-radius: 4px;
            }

            &:last-child {
                border-top-right-radius: 4px;
                border-bottom-right-radius: 4px;
            }

            &:focus {
                outline: none;
            }
        }

        .menu__list-item_selected {
            background-color: $grey;
            color: $primary-blue;
        }

        .menu__list-item:hover {
            color: $primary-blue;
        }
    }

    &_horizontal {
        text-align: left;

        .menu__list {
            background-color: transparent;
            font-size: $font-size--md;
        }

        .menu__icon {
            display: block;
            margin-right: 0;
            margin-bottom: 20px;
            margin-top: 20px;
            font-size: $font-size--xl;
        }

        .menu__list-item {
            text-align: center;
            background-color: white;
            color: $primary-black;
            cursor: pointer;
            display: inline-block;
            height: 120px;
            width: 16.6667%;

            @media (max-width: 667px) {
                width: 33.3333%;
            }
        }

        .menu__list-item_selected {
            background-color: $secondary-blue;
            color: white;
        }

        .menu__list-item:hover,
        .menu__list-item:focus {
            color: $dark-grey;
            outline: none;
        }

        .menu__list-item_selected:focus,
        .menu__list-item_selected:hover {
            color: white;
        }
    }

    &_horizontal-list,
    &_horizontal-list-bright {
        text-align: left;
        background-color: $secondary-blue;
        min-height: 45px;

        .menu__list {
            background-color: transparent;
            font-size: $font-size--sm;
        }

        .menu__list-item {
            transition: none;
            background-color: transparent;
            color: white;
            cursor: pointer;
            display: inline-block;
            margin-top: 11px;
            margin-bottom: 10px;
            margin-left: 20px;
            padding: 2px 13px;
        }

        .menu__list-item:hover {
            transition: $transition;
            background-color: transparent;
            color: $primary-black;
        }

        .menu__list-item:focus {
            color: $grey;
            outline: none;
        }

        .menu__list-item_selected,
        .menu__list-item_selected:hover {
            transition: $transition;
            padding: 2px 13px;
            border-radius: 30px;
            background-color: $primary-blue;
            color: white;
        }
    }

    &_horizontal-list-bright {
        background-color: transparent;

        .menu__list-item {
            transition: none;
            background-color: transparent;
            color: black;
            cursor: pointer;
            display: inline-block;
            margin-top: 11px;
            margin-bottom: 10px;
            margin-left: 20px;
            padding: 2px 13px;
        }


        .menu__list-item_selected,
        .menu__list-item_selected:hover {
            transition: $transition;
            padding: 2px 13px;
            border-radius: 30px;
            background-color: $primary-blue;
            color: white;
        }
    }
}
