/*=====================
  4.1  Header CSS start
==========================*/
.auth-header {
    position: sticky;
    top: 0;
    padding-top: 30px;
    padding-bottom: 30px;
    line-height: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: rgba(var(--box-bg), 1);
    z-index: 3;

    body.dark & {
        .logo-dark {
            position: absolute;
            display: block;
            height: 34px;
            left: 50%;
            top: 34px;
            transform: translateX(-50%);

            @media (max-width: 600px) {
                height: calc(24px + (34 - 24) * ((100vw - 320px) / (600 - 320)));
            }

            &.user-logo {
                display: block;
                height: 20px;
                @media (max-width: 600px) {
                    height: calc(16px + (20 - 16) * ((100vw - 320px) / (600 - 320)));
                }
            }
        }

        .logo {
            display: none;
        }
    }
    .logo {
        position: absolute;
        display: block;
        height: 34px;
        left: 50%;
        top: 34px;
        transform: translateX(-50%);

        @media (max-width: 600px) {
            height: calc(24px + (34 - 24) * ((100vw - 320px) / (600 - 320)));
        }

        &.user-logo {
            height: 20px;
            @media (max-width: 600px) {
                height: calc(16px + (20 - 16) * ((100vw - 320px) / (600 - 320)));
            }
        }
    }

    .logo-dark {
        display: none;
    }

    a {
        z-index: 1;

        .icon-btn {
            --Iconsax-Color: rgba(var(--title-color), 1);
            --Iconsax-Size: 20px;
            line-height: 1;
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid rgba(var(--content-color), 0.15);
            box-shadow: 0px 2px 15px 0px rgba(var(--title-color), 0.01);
            background-color: rgba(var(--white), 1);
            border-radius: 6px;

            @media (max-width: 600px) {
                --Iconsax-Size: calc(18px + (20 - 18) * ((100vw - 320px) / (600 - 320)));
                width: calc(30px + (40 - 30) * ((100vw - 320px) / (600 - 320)));
                height: calc(30px + (40 - 30) * ((100vw - 320px) / (600 - 320)));
            }
        }
    }

    .icons {
        --Iconsax-Color: rgba(var(--title-color), 1);
        --Iconsax-Size: 16px;
        background-color: rgba(var(--white), 0.1);
        box-shadow: 0px 2px 8px rgba(var(--title-color), 0.1);
        padding: 10px;
        border: 1px solid rgba(var(--title-color), 0.1);
        border-radius: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;

        @media (max-width: 600px) {
            width: calc(30px + (40 - 30) * ((100vw - 320px) / (600 - 320)));
            height: calc(30px + (40 - 30) * ((100vw - 320px) / (600 - 320)));
        }
    }

    h3 {
        position: absolute;
        font-weight: 500;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: rgba(var(--title-color), 1);
        white-space: nowrap;
    }

    h2 {
        position: absolute;
        font-weight: 500;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-align: center;
        color: rgba(var(--title-color), 1);
        white-space: nowrap;
    }
}

.main-header {
    position: sticky;
    top: 0;
    padding-top: 25px;
    background-color: rgba(var(--theme-color), 1);
    z-index: 2;

    @media (max-width: 600px) {
        padding-top: calc(20px + (25 - 20) * ((100vw - 320px) / (600 - 320)));
    }

    // &.sticky {
    //     position: fixed;
    //     top: 0;
    //     left: 50%;
    //     width: 100%;
    //     max-width: 600px;
    //     transform: translateX(-50%);
    // }

    .header-panel {
        position: relative;
        padding-bottom: 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        line-height: 1;
        z-index: 1;

        body.dark & {
            .logo-dark {
                position: relative;
                display: block;
                height: 28px;
                object-fit: cover;

                @media (max-width: 600px) {
                    height: calc(24px + (28 - 24) * ((100vw - 320px) / (600 - 320)));
                }

                &.user-logo {
                    height: 20px;
                    @media (max-width: 600px) {
                        height: calc(16px + (20 - 16) * ((100vw - 320px) / (600 - 320)));
                    }
                }
            }

            .logo-dark {
                display: none;
            }
        }

        .logo {
            position: relative;
            display: block;
            height: 28px;
            object-fit: cover;

            @media (max-width: 600px) {
                height: calc(24px + (28 - 24) * ((100vw - 320px) / (600 - 320)));
            }

            &.user-logo {
                height: 20px;
                @media (max-width: 600px) {
                    height: calc(16px + (20 - 16) * ((100vw - 320px) / (600 - 320)));
                }
            }
        }

        .logo-dark {
            display: none;
        }

        a {
            z-index: 1;

            .icon-btn {
                position: relative;
                --Iconsax-Color: rgba(255, 255, 255, 1);
                --Iconsax-Size: 20px;
                line-height: 1;
                width: 40px;
                height: 40px;
                display: flex;
                align-items: center;
                justify-content: center;
                border: 1px solid rgba(255, 255, 255, 0.5);
                background-color: rgba(255, 255, 255, 0.1);
                border-radius: 6px;

                @media (max-width: 600px) {
                    --Iconsax-Size: calc(18px + (20 - 18) * ((100vw - 320px) / (600 - 320)));
                    width: calc(30px + (40 - 30) * ((100vw - 320px) / (600 - 320)));
                    height: calc(30px + (40 - 30) * ((100vw - 320px) / (600 - 320)));
                }

                &.noti-icon {
                    &::after {
                        content: "";
                        position: absolute;
                        top: 10px;
                        right: 12px;
                        width: 6px;
                        height: 6px;
                        background-color: rgba(var(--error-color), 1);
                        border-radius: 100%;

                        @media (max-width: 600px) {
                            top: calc(8px + (10 - 8) * ((100vw - 320px) / (600 - 320)));
                            right: calc(8px + (12 - 8) * ((100vw - 320px) / (600 - 320)));
                        }
                    }
                }
            }

            span {
                font-size: 14px;
                font-weight: 400;
                color: rgba(var(--content-color), 1);
            }
        }

        .categories-title {
            position: relative;
            padding-bottom: 0;
            left: unset;
            top: unset;
            transform: unset;
        }

        .profile-head {
            display: flex;
            align-items: center;
            gap: 12px;

            .profile-img {
                width: 40px;
                height: 40px;

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

                .icon {
                    padding: 6px;
                    background-color: rgba(255, 255, 255, 1);
                    border: 1px solid rgba(var(--title-color), 1);
                    border-radius: 100%;
                }
            }
        }

        .icons {
            --Iconsax-Color: rgba(var(--title-color), 1);
            --Iconsax-Size: 16px;
            background-color: rgba(var(--white), 0.1);
            box-shadow: 0px 2px 8px rgba(var(--title-color), 0.1);
            padding: 10px;
            border: 1px solid rgba(var(--title-color), 0.1);
            border-radius: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 40px;
            height: 40px;

            @media (max-width: 600px) {
                width: calc(35px + (40 - 35) * ((100vw - 320px) / (600 - 320)));
                height: calc(35px + (40 - 35) * ((100vw - 320px) / (600 - 320)));
            }
        }

        h3 {
            position: absolute;
            font-weight: 500;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            padding-bottom: 20px;
            color: rgba(var(--title-color), 1);
            white-space: nowrap;
        }

        h2 {
            position: absolute;
            font-weight: 500;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
            color: rgba(var(--title-color), 1);
            white-space: nowrap;
        }

        .notification {
            width: 40px;
            height: 40px;
            background-color: rgba(var(--white), 1);
            padding: 10px;
            border: 1px solid rgba(var(--title-color), 0.1);
            border-radius: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-left: auto;
            box-shadow: 0px 2px 12px rgba(var(--title-color), 0.05);

            [dir="rtl"] & {
                margin-left: unset;
                margin-right: auto;
            }

            .notification-icon {
                position: relative;
                --Iconsax-Color: rgba(var(--title-color), 1);

                &::after {
                    content: "";
                    position: absolute;
                    top: 3px;
                    right: 3px;
                    width: 5px;
                    height: 5px;
                    background-color: rgba(var(--error-color), 1);
                    border-radius: 100%;

                    [dir="rtl"] & {
                        right: unset;
                        left: 3px;
                    }
                }
            }
        }

        .more-options {
            .dropdown-toggle {
                &::after {
                    content: none;
                }

                &.show {
                    &:first-child {
                        &:active {
                            border-color: transparent;
                            color: unset;
                            background-color: unset;
                        }
                    }
                }

                .icon-btn {
                    transform: rotate(90deg);
                }
            }

            .dropdown-menu {
                padding: 15px;

                &.show {
                    min-width: 100%;
                    color: rgba(var(--title-color), 1);
                    background-color: rgba(var(--white), 1);
                    border: none;
                    box-shadow: 0px 0px 18px 0px rgba(var(--black), 0.1);
                }

                li {
                    width: 100%;
                    padding-block: 10px;
                    border-bottom: 1px solid rgba(var(--content-color), 0.15);

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

                    &:last-child {
                        padding-bottom: 0;
                        border-bottom: none;
                    }

                    &:hover {
                        background-color: transparent;
                    }

                    .dropdown-item {
                        padding: 0 !important;
                        font-size: 13px;
                        font-weight: 500;
                        display: flex;
                        align-items: center;
                        gap: 8px;
                        color: rgba(var(--title-color), 1);

                        .icon {
                            --Iconsax-Color: rgba(var(--title-color), 1);
                            --Iconsax-Size: 16px;

                            &.error-icon {
                                --Iconsax-Color: rgba(var(--error-color), 1) !important;
                            }
                        }

                        &:active {
                            background-color: transparent;
                        }

                        &:hover {
                            background-color: transparent;
                        }
                    }
                }
            }

            &:focus-visible {
                outline: none;
            }
        }

        .rider-options {
            width: 90px;
            padding: 8px;
            font-size: 13px;
            display: flex;
            align-items: center;
            gap: 10px;
            color: rgba(var(--title-color), 1);
            background-color: rgba(var(--box-bg), 1);
            border-radius: 6px;
            border-color: transparent;
            box-shadow: none;
            --bs-form-select-bg-img: none;

            .icon {
                --Iconsax-Color: rgba(var(--title-color), 1);
                --Iconsax-Size: 14px;
            }
        }
    }

    &.inner-page-header {
        background-color: rgba(var(--white), 1);

        .header-panel {
            a {
                .icon-btn {
                    --Iconsax-Color: rgba(var(--title-color), 1);
                    background-color: rgba(var(--white), 1);
                    border: 1px solid rgba(var(--line-color), 1);
                }

                span {
                    font-size: 14px;
                    font-weight: 400;
                    color: rgba(var(--content-color), 1);
                }
            }

            h4 {
                color: rgba(var(--white), 1);
            }

            h6 {
                margin-top: 4px;
                color: rgba(var(--white), 1);
            }
        }
    }
}
