@import '../../../../../../styles/definitions/variables';
@import '../../../../../../styles/definitions/mixins';
@import '../../../../../../styles/grid';

$main-nav-text-color: var(--main-nav-text-color);
$main-nav-text-color-hover: var(--main-nav-text-color-hover);
$main-nav-text-color-active: var(--main-nav-text-color-active);
$main-nav-bg-color-hover: var(--main-nav-bg-color-hover, #{$header-cat-menu-bg-color-hover});
$main-nav-bg-color-active: var(--main-nav-bg-color-active, #{$header-cat-menu-bg-color-hover});
$items-padding: 0 20px;
$items-height: var(--items-height, #{$header-cat-items-height});
$icons-selector: '.buttonIcon_icon, .link_icon';

.headerMobile {
    &_wrapper {
        width: 100vw;

        &--small-text {
            &, .headerMobile_menuLabel {
                @include default($bodyFontSize6);
            }
            #{$icons-selector} {
                height: $bodyFontSize6;
            }
        }
        &--medium-text {
            &, .headerMobile_menuLabel {
                @include default($bodyFontSize5);
            }
            #{$icons-selector} {
                height: $bodyFontSize5;
            }
        }
        &--large-text {
            &, .headerMobile_menuLabel {
                @include default($bodyFontSize4);
            }
            #{$icons-selector} {
                height: $bodyFontSize4;
            }
        }
    }

    &_menuLink {
        &--userCompanyDropDown {
            background: none;
            border: none;
            margin: 0;
            font: inherit;
            text-decoration: none;
            cursor: pointer;
            width: 100%;

            &:hover,
            &:focus {
                text-decoration: underline;
            }
            > span {
                width: 100%;
            }
        }
    }

    &_userDropdownItem {
        &--userDropdownCompanySwitcher {
            font-size: 12px;
            color: $gray-61;
            padding: 6px 20px 4px;
            letter-spacing: 0.5px;
            text-transform: uppercase;
        }
    }

    &_userCompanyDropdownSpan {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    &_userCompanyText {
        text-align: left;
    }

    &_userCompanyDropdownSpanSelected {
        display: flex;
        font-size: 14px;
        color: #29732d;
        font-weight: 500;
        text-transform: capitalize;
        margin-top: 2px;
    }

    &_userCompanyDropdownSelectedCompany {
        color: $green-33
    }

    &_menuDivider {
        border: none;
        border-top: 1px solid #e0e0e0;
    }

    &_mainNavWrapper {
        background-color: var(--main-nav-bg-color, #{$header-cat-menu-bg-color});
        height: var(--main-nav-height, auto);
        overflow: hidden;

        .headerMobile_menuLink {
            color: $main-nav-text-color;
            fill: $main-nav-text-color;

            &:hover,
            &:focus {
                color: $main-nav-text-color-hover;
                fill: $main-nav-text-color-hover;
                background-color: $main-nav-bg-color-hover;
                text-decoration: none;
            }

            &:active {
                color: $main-nav-text-color-active;
                fill: $main-nav-text-color-active;
                background-color: $main-nav-bg-color-active;
            }
        }
    }

    &_auxNavWrapper {
        background-color: var(--aux-nav-bg-color, #{$header-aux-bar-bg-color});
        color: var(--aux-nav-text-color);
    }

    &_userProfile {
        display: inline-flex;
        align-items: center;
    }

    &_userAvatar {
        margin-right: 15px;
    }

    &_subMenuLink {
        padding-left: 10px;
    }

    &_menu {
        &PreviousButton {
            padding: $items-padding;
            height: $items-height;
            width: 100%;
            justify-content: flex-start;
            color: $main-nav-text-color;
            fill: $main-nav-text-color;
            font-weight: bold;

            &:hover,
            &:focus {
                color: $main-nav-text-color-hover;
                fill: $main-nav-text-color-hover;
                background-color: $main-nav-bg-color-hover;
            }

            &:active {
                color: $main-nav-text-color-active;
                fill: $main-nav-text-color-active;
                background-color: $main-nav-bg-color-active;
            }
        }

        &Item {
            &--branch-name {
                font-weight: bold;
                color: $main-nav-text-color;
            }

            &--branches-navigation,
            &--user-profile {
                border-bottom: 1px solid $gray;
            }

            #{$icons-selector} {
                opacity: $header-cat-carets-opacity;
            }

            .buttonIcon_text {
                line-height: 1;
            }
        }

        &Link {
            justify-content: space-between;
            width: 100%;
            height: $items-height;
            padding: $items-padding;

            &--subMenuLink {
                padding-left: 40px;
            }
        }
    }
}
