@use "../utils/variables";

/**=====================
      Header CSS Start
==========================**/
%for-animated-hover {
    box-shadow: 1px 2px 3px -3px rgba(variables.$dark-color, 0.60);
    transform: translateY(12px);
    opacity: 0;
    visibility: hidden;
    right: 0;
}

%for-animated-hover-box {
    opacity: 1;
    transform: translateY(0px);
    visibility: visible;
}

.logo-wrapper {
    @media (max-width: 480px) {
        display: none;
    }

    img {
        &.light-mode {
            display: flex;
        }

        &.dark-mode {
            display: none;
        }
    }

    .sm-logo {
        display: none;
    }
}

.sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);

    .logo-wrapper {
        a {
            display: inline-block;
            width: auto;
            object-fit: contain;

            img {
                width: 115px;
                height: 32px;
            }
        }
    }

    >a {
        font-size: unset;
        line-height: unset;
        height: unset;
        width: 38px;
        height: 38px;
        background: rgba(59, 68, 66, 1);
        border-radius: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.page-wrapper {
    .page-main-header {
        background-color: variables.$white;
        position: variables.$main-header-position;
        height: variables.$header-size;
        top: variables.$main-header-top;
        z-index: 6;
        width: calc(100vw - variables.$sidebar-width);
        display: flex;
        align-items: center;
        transition: 0.3s;
        margin-left: variables.$sidebar-width;
        // box-shadow: 2px 0px 9px #eee;

        &.open {
            margin-left: 120px;
            width: calc(100vw - 120px);
            transition: variables.$sidebar-transition;
        }

        .main-header {
            width: 100%;
            height: 100%;
            display: flex;
            align-items: center;
            padding: variables.$main-header-padding;
            margin: 0;

            i {
                color: rgba(variables.$dark-color, 0.75);
                font-size: 20px;
            }

            .nav-menus {
                display: flex;
                align-items: center;
                font-size: 15px;

                li {
                    color: variables.$dark-color;
                    padding: variables.$header-li-padding;

                    &:empty {
                        display: none;
                    }

                    a {
                        color: variables.$dark-color;
                        font-weight: 400;
                        display: flex;
                        align-items: center;
                        gap: 10px;
                        min-width: max-content;
                        width: 100%;
                        font-size: 14px;
                    }

                    &.onhover-dropdown {
                        .badge {
                            height: 16px;
                            width: 16px;
                            position: absolute;
                            top: -4px;
                            right: -1px;
                            font-size: 11px;
                        }
                    }
                }

                .dark-light-mode {
                    cursor: pointer;

                    .light-mode {
                        display: flex;
                    }

                    .dark-mode {
                        display: none;
                    }
                }
            }

            .nav-left {
                .nav-menus {
                    li {
                        padding: 6px;

                        &:empty {
                            display: none;
                        }
                    }

                    .new-btn {
                        padding: 8px 17px;
                        color: var(--primary-color);
                        font-weight: 500;
                        border-radius: 4px;
                        overflow: hidden;
                        position: relative;
                        z-index: 0;

                        &::before {
                            content: "";
                            position: absolute;
                            top: 0;
                            left: 0;
                            width: 100%;
                            height: 100%;
                            background-color: var(--primary-color);
                            opacity: 0.09;
                        }

                        i {
                            color: var(--primary-color);
                        }

                        &.custom-padding {
                            padding: 4px 17px;
                        }
                    }

                    .onhover-dropdown {
                        .onhover-show-div {
                            ul {
                                li {
                                    padding: 0;
                                    margin-bottom: 8px;

                                    &:last-child {
                                        margin-bottom: 0;
                                    }

                                    a {
                                        line-height: 1.5;
                                    }
                                }
                            }
                        }

                        .quick-dropdown-box {
                            .onhover-show-div {
                                right: unset;
                                padding: 0;

                                .dropdown-title {
                                    padding: 18px;
                                    border-bottom: 1px dashed variables.$white-dark;
                                    color: variables.$dark-font;

                                    h4 {
                                        margin-bottom: 0;
                                        font-size: 18px;
                                        font-weight: 600;
                                    }
                                }

                                .dropdown-list {
                                    display: grid;
                                    grid-template-columns: 1fr 1fr;
                                    width: 350px;
                                    text-align: center;

                                    li {
                                        margin-bottom: 0;

                                        &:nth-child(odd) {
                                            border-right: 1px dashed variables.$white-dark;
                                        }
                                    }

                                    a {
                                        display: grid !important;
                                        font-size: 13px;
                                        padding: 12px;
                                        border-top: unset;
                                        border-bottom: 1px dashed variables.$white-dark;
                                        opacity: 1;
                                        color: variables.$dark-font !important;

                                        .svg-box {
                                            width: 40px;
                                            height: 40px;
                                            border: 1px solid variables.$white-dark;
                                            background-color: #F3F3F3;
                                            border-radius: 100%;
                                            display: flex;
                                            align-items: center;
                                            justify-content: center;
                                            margin-inline: auto;
                                        }

                                        span {
                                            font-weight: 500;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }

            .mobile-sidebar {
                padding: 0;
                margin-top: -3px;

                i {
                    font-size: 22px;
                }
            }

            .nav-right {
                text-align: right;
                padding-left: variables.$main-header-nav-right;

                ul {
                    gap: 15px;

                    @media (max-width: 991px) {
                        gap: 8px;
                    }

                    li {
                        &.onhover-dropdown {
                            display: flex;
                            align-items: center;
                            justify-content: center;
                            width: calc(35px + (40 - 35) * ((100vw - 320px) / (1920 - 320)));
                            height: calc(35px + (40 - 35) * ((100vw - 320px) / (1920 - 320)));
                            background-color: #F3F3F3;
                            border-radius: 50%;

                            >a {
                                justify-content: center;

                                &:hover {
                                    animation: shake 2s ease infinite;
                                }
                            }

                            i {
                                &:hover {
                                    animation: shake 2s ease infinite;
                                }
                            }
                        }

                        &:last-child {
                            padding: unset;
                            width: unset;
                            height: unset;
                            background-color: unset;
                            border-radius: unset;
                        }

                        .media {
                            .dotted-animation {
                                position: relative;
                                right: -3px;
                                top: -7px;

                                .animate-circle {
                                    position: absolute;
                                    top: -20px;
                                    right: -4px;
                                    height: 25px;
                                    width: 25px;
                                    z-index: 10;
                                    border: 5px solid variables.$primary-color;
                                    border-radius: 70px;
                                    animation: heartbit 1s ease-out;
                                    animation-iteration-count: infinite;
                                }

                                .main-circle {
                                    width: 6px;
                                    height: 6px;
                                    border-radius: 30px;
                                    background-color: var(--primary-color);
                                    position: absolute;
                                    right: 6px;
                                    top: -10px;
                                }
                            }
                        }

                        svg {
                            width: variables.$main-header-nav-icon-size;
                            height: variables.$main-header-nav-icon-size;

                            path {
                                color: variables.$main-header-nav-icon-color;
                            }
                        }

                        .dot {
                            width: 3px;
                            height: 3px;
                            border-radius: 30px;
                            background-color: variables.$main-header-nav-icon-color;
                            position: absolute;
                            right: 17px;
                            bottom: 6px;
                            animation: blink 1.5s infinite;
                        }

                        .dot-chat {
                            right: 4px;
                            bottom: -11px;
                        }

                        &.currency-dropdown {
                            @media (max-width: 767px) {
                                padding: 4px 6px !important;
                            }

                            >a {
                                &.txt-dark {
                                    min-width: unset;
                                }
                            }

                            .onhover-show-div {
                                li {
                                    width: 100%;
                                    padding: 6px 10px;

                                    &:hover {
                                        a {
                                            color: var(--primary-color);
                                        }
                                    }

                                    a {
                                        transition: all 0.2s ease-in-out;
                                        display: flex;
                                        align-items: center;
                                        gap: 8px;
                                    }
                                }
                            }
                        }
                    }
                }

                >ul {
                    display: flex;
                    justify-content: flex-end;
                    align-items: center;
                    padding: 0 20px 0 10px;

                    @media (max-width: 991px) {
                        padding-right: unset;
                    }

                    >li {
                        position: relative;

                        &:first-child {
                            border-left: none;
                        }
                    }
                }

                .language-dropdown {
                    min-width: 160px;
                    width: max-content;
                    text-align: left;
                    left: unset;
                    right: 0;
                    border-radius: 6px;

                    li {
                        display: block;
                        padding: 4px 0;

                        a {
                            display: flex;
                            align-items: center;
                            gap: 8px;
                            font-size: 14px;

                            i {
                                margin-right: 10px;
                            }

                            span {
                                transition: all 0.35s ease;
                                transform: translateX(0px);
                            }
                        }

                        img {
                            width: 25px;
                        }

                        &:first-child {
                            padding-top: 0;
                        }

                        &:hover {
                            a {
                                span {
                                    transition: all 0.35s ease;
                                    transform: translateX(4px);
                                    color: variables.$dark-color;
                                }
                            }
                        }
                    }
                }

                .profile-dropdown {
                    right: 0;
                    top: 60px;

                    &:before,
                    &:after {
                        left: inherit;
                        right: 0;
                    }

                    li {
                        display: block;
                        text-align: left;
                        padding: 0;
                        margin-bottom: 8px;

                        &:last-child {
                            margin-bottom: 0;
                        }

                        a {
                            i {
                                line-height: 1;
                            }
                        }
                    }

                    .inner-dropdown {
                        display: flex;
                        align-items: flex-start;
                        gap: 14px;

                        img {
                            width: 64px;
                            height: 64px;
                        }
                    }
                }
            }

            li {
                display: inline-block;
                position: relative;
            }
        }
    }

    .page-body-wrapper {
        .page-body {
            min-height: calc(100vh - 131px);
            margin-top: variables.$header-size;
            margin-bottom: variables.$footer-size;
            padding: variables.$page-body-padding;
            position: relative;
            background-color: variables.$gray-medium;
        }
    }
}

.page-wrapper {
    position: relative;

    .sub-header {
        padding: calc(10px + (14 - 10) * ((100vw - 320px) / (1920 - 320)));
        background: linear-gradient(8deg, variables.$primary-color -63%, #313131 84%) !important;
        margin: 0;
        text-align: center;
        border-radius: 0;
        position: fixed;
        top: 0;
        width: 100%;
        // display: block;
        z-index: 2;
        // background-image: url(../images/announcement-bar.svg);
        background-repeat: no-repeat;
        background-size: cover;
        height: 52px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .offer-text {
        color: variables.$white;
        letter-spacing: 0.4px;
        line-height: 1.3;
        font-size: calc(13px + (14 - 13) * ((100vw - 320px) / (1920 - 320)));
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 10px;
        margin-bottom: 0;

        .btn {
            color: variables.$primary-color;
            display: inline-block;
            margin-left: 3px;
            padding: 4px;
            border-radius: 4px;
            transition: all 0.4s ease-in-out;
            font-weight: 600;
            font-size: calc(12px + (14 - 12) * ((100vw - 320px) / (1920 - 320)));
            line-height: 1;
            background-color: variables.$white;

            // &:hover {
            //     background-color: rgba($white, 0.2);
            //     border-color: rgba($white, 1);
            //     transition: all 0.4s ease-in-out;
            //     color: rgba($white, 1);
            // }
        }
    }

    &:has(.sub-header .offer-text) {

        .page-main-header,
        .page-sidebar {
            margin-top: 52px;

            .main-header-left {
                height: 67px;
            }
        }

        .page-body-wrapper {
            .page-body {
                min-height: calc(100vh - 67px - 65px - 52px);
                margin-top: 112px;
            }
        }
    }
}

.nav-menus {
    .cleaning {
        &:hover {
            animation: shake 2s ease infinite;
        }
    }

    .onhover-dropdown {
        cursor: pointer;
        position: relative;

        &:before {
            display: none;
        }

        &:hover {
            .onhover-show-div {
                @extend %for-animated-hover-box;
            }
        }

        .notify-bell {
            animation: ring 2s ease-in-out infinite;
        }
    }
}

.onhover-show-div {
    padding: 16px;
    top: 55px;
    position: absolute;
    z-index: 8;
    background-color: variables.$white;
    transition: all linear 0.3s;
    box-shadow: 0 0 20px #59667a1a;
    min-width: 140px;
    border-radius: 6px;
    @extend %for-animated-hover;

    .dropdown-title {
        padding: 0;
        padding-bottom: 10px;
        text-align: left;
        margin-bottom: 0;
        font-size: 18px;
        font-weight: 600;
        border-bottom: 1px dashed variables.$white-dark;
    }

    .dropdown-footer {
        padding: 0;
        padding-top: 16px;
        margin-top: 6px;
        border-top: 1px dashed rgba(145, 142, 153, 0.3);

        .total {
            display: flex;
            align-items: center;
            gap: 8px;
            justify-content: space-between;
            font-size: 14px;
            font-weight: 500;
            margin-bottom: 16px;

            span {
                color: variables.$dark-color;
                font-weight: 500;
            }
        }

        .btn {
            font-weight: 500 !important;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1.5;
        }
    }

    ul {
        padding: 0;
        text-align: left;
        max-height: 250px;
        overflow: auto;
        height: auto;

        li {
            display: block !important;

            &:hover {

                a,
                i {
                    transition: none;
                    color: var(--primary-color) !important;
                }
            }
        }
    }

    &.cart-dropdown {
        width: 350px;

        @media(max-width: 577px) {
            width: 288px;
        }

        li {
            padding: 16px 0 !important;
            width: 100%;

            .media {
                position: relative;
                gap: 12px;

                .media-img {
                    width: 60px;
                    height: 60px;
                }

                .media-content {
                    a {
                        font-weight: 500;
                        color: variables.$dark-color;
                        margin-bottom: 0;
                        font-size: 15px;
                        display: -webkit-box;
                        -webkit-line-clamp: 1;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        width: 100%;
                        min-width: unset;
                    }

                    h6 {
                        font-size: 16px;
                    }
                }
            }

            +li {
                border-top: 1px solid rgba(variables.$dark-color, 0.08);
            }

            &:last-child {
                padding-bottom: 0 !important;
            }
        }

        .remove-svg {
            position: absolute;
            right: 0;
            top: 0;
            width: 21px;
            height: 21px;
            margin: 0;
            background-color: unset;
            border: none;

            i {
                color: variables.$danger-color !important;
                font-size: 18px;
            }
        }
    }

    &.message-dropdown {
        width: 350px;

        .message-box {
            padding: 16px 0 0;
        }

        li {
            display: flex;
            align-items: start;
            gap: 12px;
            padding: 12px !important;
            width: 100%;
            margin-bottom: 16px !important;
            border-radius: 6px;

            &:last-child {
                margin-bottom: 0 !important;
            }

            .media {
                position: relative;
                gap: 12px;
                justify-content: space-between;

                .media-img {
                    width: 35px;
                    height: 35px;
                    border-radius: 100%;
                }

                .hours {
                    white-space: nowrap;
                    font-size: 13px;
                    font-weight: 500;
                }

                .media-content {
                    a {
                        font-weight: 500;
                        margin-bottom: 0;
                        font-size: 14px;
                        display: -webkit-box;
                        -webkit-line-clamp: 1;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        width: 100%;
                    }

                    h6 {
                        font-size: 16px;
                    }

                    p {
                        margin: 0;
                        display: -webkit-box;
                        -webkit-line-clamp: 2;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        width: 100%;
                        color: variables.$dark-color;
                    }
                }
            }
        }
    }

    &.notification-dropdown {
        width: 350px;
        cursor: default;

        @media (max-width:390px) {
            width: 270px;
            top: 65px;
        }

        .notification-box {
            padding: 16px 0 0;

            .no-notifications {
                padding-block: 20px !important;

                .no-data {
                    img {
                        width: calc(100px + (120 - 100) * ((100vw - 320px) / (1920 - 320)));
                    }
                }
            }

            .notification-item {
                margin-bottom: 0;
                cursor: pointer;

                .media {
                    .notification-img {
                        img {
                            width: calc(39px + (45 - 39) * ((100vw - 320px) / (1920 - 320)));
                            height: calc(39px + (45 - 39) * ((100vw - 320px) / (1920 - 320)));
                            border-radius: 100%;
                        }

                        .user-round {
                            width: 40px;
                            min-width: 40px;
                            height: 40px;
                            border-radius: 100%;
                            display: inline-flex;
                            align-items: center;
                            justify-content: center;
                            background-color: rgba(variables.$dark-color, 0.08);
                            text-transform: uppercase;

                            h6 {
                                font-size: 20px;
                                color: rgba(variables.$dark-color, 0.7);
                                line-height: 1.3;
                                padding: 0;
                                border: none;
                                margin: 0;
                            }
                        }
                    }

                    .media-body {
                        display: flex;
                        align-items: flex-end;
                        width: calc(100% - 10px - calc(39px + (45 - 39) * ((100vw - 320px) / (1920 - 320))));
                        justify-content: space-between;
                        gap: 15px;

                        h5 {
                            font-size: 14px;
                            font-weight: 500;
                            color: rgb(61, 67, 74);
                            line-height: 1.3;
                            margin: 0;
                        }

                        h6 {
                            font-size: 14px;
                            font-weight: 400;
                            color: rgba(141, 141, 141, 1);
                            padding: 0;
                            margin-block: 6px 0;
                            border: 0;
                            line-height: 1.3;

                        }

                        small {
                            font-size: 14px;
                            font-weight: 400;
                            color: rgba(141, 141, 141, 1);
                            margin-top: 4px;
                            display: block;
                        }

                        .badge {
                            background-color: var(--primary-color);
                            color: variables.$white;
                        }

                        .text-end {
                            display: flex;
                            flex-direction: column;
                            align-items: flex-end;
                        }
                    }
                }
            }
        }

        li {
            padding: 12px !important;
            background-color: rgba(variables.$gray-color, 0.2);
            width: 100%;
            margin-bottom: 16px !important;
            border-radius: 6px !important;

            &:last-child {
                margin-bottom: 0 !important;
            }

            &:hover {
                i {
                    color: #E44141 !important;
                }
            }

            .onhover-dropdown {
                i {
                    &:hover {
                        animation: none;
                    }
                }
            }

            .media {
                position: relative;
                gap: 12px;

                i {
                    &:hover {
                        animation: none !important;
                    }
                }

                .media-img {
                    width: 35px;
                    height: 35px;
                    border-radius: 5px;
                    display: flex;
                    align-items: center;
                    justify-content: center;

                    i {
                        font-size: 18px;
                    }
                }

                .media-content {
                    display: flex;
                    align-items: flex-start;
                    gap: 14px;

                    a {
                        font-weight: 500;
                        color: var(--primary-color);
                        margin-bottom: 0;
                        font-size: 14px;
                        display: -webkit-box;
                        -webkit-line-clamp: 2;
                        -webkit-box-orient: vertical;
                        overflow: hidden;
                        width: 100%;
                        min-width: unset;
                        line-height: 1.3;
                    }

                    h6 {
                        font-size: 16px;
                    }

                    p {
                        display: inline-block;
                        color: rgba(variables.$dark-color, 0.6);
                        margin: 0;
                        width: 100%;
                    }

                    .view {
                        font-weight: 600;
                        color: variables.$dark-color;
                    }

                    .remove-svg {
                        position: relative;
                        inset: unset;
                        width: auto;
                        height: auto;
                        margin: 0;
                        background-color: unset;
                        border: none;
                        display: flex;
                        align-items: center;
                        gap: 5px;

                        i {
                            color: #505050 !important;
                            font-size: 16px;
                            width: auto;

                            &:hover {
                                animation: none !important;
                            }
                        }
                    }
                }
            }
        }
    }
}

.profile-box {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 15px;
    gap: 10px;
    color: variables.$sidebar-font-color;
    text-align: left;

    h6 {
        margin: 0;
        line-height: 1.5;
        color: rgba(variables.$dark-color, 0.8);
        font-weight: 500;
        font-size: 15px;
        text-transform: capitalize;
    }

    span {
        line-height: 1;
        color: rgba(variables.$dark-color, 0.6);
        font-size: 13px;
        font-weight: 500;
        text-transform: capitalize;
    }

    .profile-image {
        width: 45px;
        height: 45px;
        object-fit: cover;
    }

    .profile-img {
        .user-round {
            width: calc(35px + (40 - 35) * ((100vw - 320px) / (1920 - 320)));
            height: calc(35px + (40 - 35) * ((100vw - 320px) / (1920 - 320)));
            border-radius: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            background-color: rgba(variables.$gray-color, 0.4);
            margin: 0 auto;

            h6 {
                font-size: calc(16px + (18 - 16) * ((100vw - 320px) / (1920 - 320)));
                font-weight: 600;
                text-transform: capitalize;
                letter-spacing: 0.4px;
            }
        }
    }

    img {
        width: 35px;
        height: 35px;
        border-radius: 100%;
    }
}

.dark-light-mode {
    cursor: pointer;

    .light-mode {
        display: flex;
    }

    .dark-mode {
        display: none;
    }
}

.plus-minus,
.increment {
    background-color: gray;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0;

    i {
        font-size: 18px;
        color: #808B97;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 29px;
        height: 29px;
    }

    input {
        color: lightblue;
        border: none;
        background-color: gray;
        text-align: center;
        width: 30px;
        height: 30px;
    }

    .add {
        background-color: var(--primary-color);
        color: #fff;
        border-radius: 6px;
    }
}

.main-header-left {
    width: max-content;
    padding-inline: 20px;

    i {
        font-size: 22px;
        color: variables.$dark-color;
    }

    .logo-wrapper {
        a {
            color: variables.$sidebar-font-color;
            display: inline-block;
            width: auto;
            height: calc(22px + (40 - 22) * ((100vw - 320px) / (1920 - 320)));
            object-fit: contain;

            img {
                width: 100%;
                height: 100%;
            }

            i {
                font-size: 20px;
            }
        }
    }

    a {
        &.toggle {
            width: calc(35px + (40 - 35) * ((100vw - 320px) / (1920 - 320)));
            height: calc(35px + (40 - 35) * ((100vw - 320px) / (1920 - 320)));
            border-radius: 50%;
            background: variables.$primary-color;
            display: flex;
            align-items: center;
            justify-content: center;

            .sidebar-toggle {
                width: 18px;
                height: 18px;
            }
        }
    }
}

/**=====================
      Header CSS End
==========================**/
