/*
 * DigitalUp custom menu overrides for Journal 3.
 * Loaded in common/header.twig after Journal's style.css, inline CSS and Custom CSS.
 */

.top-bar {
    .top-menu-2 {
        .menu-item {
            &:not(:last-child) {
                span.links-text {
                    position: relative;

                    &:after {
                        content: " | ";
                        color: white;
                        margin-left: 7px;
                    }
                }
            }
        }
    }

    .third-menu {
        .menu-item {
            &:not(:last-child) {
                span.links-text {
                    position: relative;

                    &:after {
                        content: " / ";
                        color: white;
                        margin-left: 7px;
                    }
                }
            }

            &:last-child {
                &.top-menu-item {
                    margin-left: 0;
                }
            }
        }
    }
}

/** overrides */
.desktop-header-active .header .top-bar .language-currency {
    position: static;
    left: auto;
    transform: none;
}

#logo {
    > a {
        &:focus {
            outline: unset !important;
        }
    }
}

.mobile-header {
    .mobile-top-bar {
        .top-menu-item-1 {
            .links-text {
                position: relative;
                display: inline-block;
                max-width: 250px;
                text-overflow: unset;
                overflow: unset;
                white-space: unset;
                line-height: 15px;
            }
        }

        .links-text {
            color: black;
        }
    }
}

.mobile-header-active {
    .mobile-logo-wrapper {
        height: auto;

        #logo {
            img {
                width: 100%;
                max-width: 125px;
            }
        }
    }

    .language .dropdown::after {
        display: none;
    }

    .menu-trigger {
        width: auto;
    }

    #cart-items.count-badge {
        margin-top: 0;
        top: -5px;
    }

    .mini-search {
        .search-trigger {
            &::before {
                top: -6px;
            }
        }
    }
}

.mobile-custom-menu {
    .count-badge {
        top: -5px;
    }
}

.mobile-main-menu-wrapper{
    .count-badge{
        display: none !important;
    }
}

@media only screen and (max-width: 1199px) {
    .header-lg {
        .top-menu-2 {
            .menu-item {
                > a {
                    &::before {
                        display: none;
                    }
                }
            }
        }
    }
}

@media only screen and (min-width: 1024px) {
    #cart-total {
        padding-left: 25px;
    }
    .desktop-header-active {
        .header-classic {
            .mid-bar {
                .classic-cart-wrapper{
                    order: 10 !important;
                    justify-content: flex-end;
                }
                .desktop-search-wrapper{
                    order: 0 !important;
                }
            }
        }
    }
}

/** menu global fixes  */
.desktop-main-menu-wrapper::before {
    display: none;
}

.desktop-main-menu-wrapper {
    background: rgba(34, 64, 154, 1);
    height: auto;
}

.desktop-main-menu-wrapper .main-menu .main-menu-item.dropdown > a::after {
    transition: transform 0.5s linear;
    opacity: 0;
}

.desktop-main-menu-wrapper .main-menu .main-menu-item.dropdown.--parent > a::after{
    opacity: 1;
}

.desktop-main-menu-wrapper .main-menu .main-menu-item.dropdown > a:hover::after {
    -webkit-transform: rotate(90deg);
    transform: rotate(270deg);
}

.main-menu > .j-menu > li > a {
    padding: 15px 15px !important;
}

@media (min-width: 1024px) and (max-width: 1599px) {
    .desktop-main-menu-wrapper .main-menu > .j-menu > li > a {
        font-size: 10px;
        padding: 15px 5px !important;
    }
}

@media (min-width: 1280px){
    .desktop-main-menu-wrapper .main-menu > .j-menu > li > a {
        font-size: 12px;
    }
}

@media (min-width: 1600px) {
    .desktop-main-menu-wrapper .main-menu > .j-menu > li > a {
        font-size: 14px;
    }
}

.desktop-main-menu-wrapper .main-menu > ul {
    max-width: var(--container-fluid);
    padding-left: 15px;
    padding-right: 15px;
    margin: auto;
    justify-content: center;
    > li.menu-item{
        flex-grow: 0;
        -webkit-flex-grow: 0;
    }
}

.menu-item{
    .dropdown-menu{
        ul.j-menu{
            > li > a{
                &::after{
                    display: none !important;
                }
            }
        }
    }
}

.desktop-header-active .is-sticky .header .desktop-main-menu-wrapper {
    max-width: var(--container-fluid);
}
.grid-cols{
    max-width: var(--container);
}
@media only screen and (max-width: 1439px) {
    .desktop-header-active .header .main-menu-item > a .links-text {
        font-size: 12px;
    }
}


/** end of menu global fixes  */

/* Main menu "DU Custom Menu" (vqmod digitalup_main_menu_custom_type.xml, journal3/module/main_menu.twig):
   columns = subcategories of the linked category, links = their subcategories. */
/* Desktop dropdown: edge to edge, up to --container-fluid (1920px); content sits in .--container (twig). */
.du-custom-menu > .dropdown-menu {
    left: 0;
    right: 0;
    width: 100%;
    max-width: var(--container-fluid);
    margin-left: auto;
    margin-right: auto;
}

.du-custom-menu a {
    text-decoration: none;

    &:hover {
        text-decoration: underline;
    }
}

.du-custom-menu-content {
    padding: 25px 0;
    background: #fff;
    border-top: 3px solid #1891d0 !important;
}

/* Flex columns: --du-menu-cols per row (3 / 4 / 6 by breakpoint), extra columns wrap and continue under the first one. */
.du-custom-menu__columns {
    --du-menu-col-gap: 30px;
    --du-menu-cols: 3;
    display: flex;
    flex-wrap: wrap;
    column-gap: var(--du-menu-col-gap);
    row-gap: 20px;
}

@media only screen and (min-width: 1200px) {
    .du-custom-menu__columns {
        --du-menu-cols: 4;
    }
}

@media only screen and (min-width: 1440px) {
    .du-custom-menu__columns {
        --du-menu-cols: 6;
    }
}

.du-custom-menu__column {
    flex: 0 0 calc((100% - (var(--du-menu-cols) - 1) * var(--du-menu-col-gap)) / var(--du-menu-cols));
    max-width: calc((100% - (var(--du-menu-cols) - 1) * var(--du-menu-col-gap)) / var(--du-menu-cols));
    min-width: 0;
}

.du-custom-menu__title {
    display: block;
    margin-bottom: 12px;
    color: rgb(34 64 154);
    font-weight: 700;
    text-transform: uppercase;

    &:hover {
        text-decoration: underline;
    }
}

.du-custom-menu__list {
    margin: 0;
    padding: 0;
    list-style: none;

    li {
        margin-bottom: 8px;
    }

    a {
        color: #333;

        &:hover {
            color: rgb(34 64 154);
        }
    }
}

/* Mobile off-canvas (accordion) menu: one column, no extra padding. */
.accordion-menu {
    .du-custom-menu-content {
        padding: 10px 0;
    }

    .du-custom-menu-content > .--container {
        padding-left: 0;
        padding-right: 0;
    }

    .du-custom-menu__column {
        flex-basis: 100%;
        max-width: 100%;
    }
}


.cart-content {
    .cart-buttons {
        flex-direction: column;
        a.btn-cart.btn {
            margin-bottom: 15px;
            background: white;
            color: black;
            border: 1px solid #22409a;
            min-width: 200px;
            &:hover {

            }
        }
        a.btn-checkout.btn{
            min-width: 200px;
        }
    }
}
.cart-bottom {
    .buttons  {
        a.btn.btn-default {
            background: white;
            color: black;
            border: 1px solid #22409a;

            &:hover {

            }
        }
    }
}

@media only screen and (min-width: 1200px) {
    .cart-content {
        .cart-buttons {
            flex-direction: initial;
            a.btn-cart.btn {
                margin-bottom: 0;
                min-width: unset;
            }
            a.btn-checkout.btn{
                min-width: unset;
            }
        }
    }
}

.breadcrumb li:last-child{
    > a{
        font-weight: bold;
    }
}