@font-face {
    font-family: "IcoMoon Header";
    src: url("header.woff") format("woff");
    font-display: block;
}

.header-icon {
    display: inline-block;
    font: normal 20px/1 "IcoMoon Header", sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media (min-width: 768px) {
    .header-icon {
        font-size: 24px;
    }
}

.icomoon-search::before {
    content: "\e926";
}

.icomoon-user::before {
    content: "\e927";
}

.icomoon-wishlist::before {
    content: "\e918";
}

.icomoon-cart::before {
    content: "\e919";
}

.header-mukafaati {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    min-height: 2rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: #f1f1f1;
    color: #111;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.header-mukafaati:hover,
.header-mukafaati:focus-visible {
    border-color: #000;
    color: #000;
    text-decoration: none;
}

.header-mukafaati svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Align the visible lettering with the centered gift icon in Poppins and Tajawal. */
.header-mukafaati > span {
    transform: translateY(0.04em);
}

.header-mukafaati:lang(ar) > span {
    transform: translateY(0.1em);
}

/* Deraah opens the widget from its header. Gameball injects the launcher into this separate iframe. */
iframe[id="btnIframe"] {
    display: none !important;
}

.icomoon-home::before {
    content: "\e953";
}

.icomoon-store::before {
    content: "\e980";
}

.icomoon-location::before {
    content: "\e96e";
}

.icomoon-phone::before {
    content: "\e972";
}

.icomoon-mail::before {
    content: "\e971";
}

.icomoon-note::before {
    content: "\e95d";
}

.icomoon-package::before {
    content: "\e989";
}

.icomoon-categories::before {
    content: "\e969";
}

.icomoon-gift::before {
    content: "\e95f";
}

.icomoon-explore::before {
    content: "\e95c";
}

.icomoon-chat::before {
    content: "\e935";
}

.icomoon-headset::before {
    content: "\e981";
}

body:has(#mobile-chat-launcher:not([hidden])) #embedded-messaging:not(:has(.embeddedMessagingFrame.isMaximized)) :is(.embeddedMessagingConversationButton, .embeddedMessagingMinimizedNotification) {
    display: none !important;
}

/* Keep the minimized frame mounted so Salesforce can complete its window transition. */
body:has(#mobile-chat-launcher:not([hidden])) #embedded-messaging .embeddedMessagingFrame.isMinimized {
    visibility: hidden !important;
    pointer-events: none !important;
}

.storefront-chat-close {
    display: none;
}

@media (max-width: 767.98px) {
    #embedded-messaging:has(.storefront-chat-close) {
        --chat-space-above: clamp(56px, calc(var(--chat-height, 100dvh) * 0.14), 8rem);
        --chat-bottom-gap: max(8px, env(safe-area-inset-bottom));
    }

    #embedded-messaging:has(.storefront-chat-close) > .embeddedMessagingFrame.isMaximized {
        inset: auto;
        top: calc(var(--chat-top, 0px) + var(--chat-space-above));
        left: calc(var(--chat-left, 0px) + 1rem);
        width: calc(var(--chat-width, 100vw) - 2rem);
        height: calc(var(--chat-height, 100dvh) - var(--chat-space-above) - var(--chat-bottom-gap));
        min-height: 0;
        max-width: none;
        max-height: none;
        margin: 0;
    }

    #embedded-messaging > .storefront-chat-close:not([hidden]) {
        position: fixed;
        top: calc(var(--chat-top, 0px) + var(--chat-space-above) - 52px);
        left: calc(var(--chat-left, 0px) + var(--chat-width, 100vw) / 2 - 22px);
        z-index: 1002;
        display: grid;
        place-items: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid #ddd;
        border-radius: 50%;
        background: #fff;
        color: #111;
        font: 26px/1 sans-serif;
        cursor: pointer;
    }

    /* A transformed sticky header would make the fixed menu relative to the header. */
    body.menu-opened .js-header {
        transform: none;
        transition: none;
    }

    .header-mukafaati {
        display: none;
    }

    .bottomNav--deraah {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) minmax(0, 2fr);
        grid-template-rows: 100%;
    }

    /* The trailing actions share two columns even when the site hides Explore. */
    .bottomNav--deraah:has(.bottomNav__mukafaati) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 2fr);
    }

    .bottomNav--deraah .bottomNav__end {
        flex-wrap: nowrap;
        height: 100%;
    }

    .bottomNav__end > [nav-id] {
        flex: 1 1 0;
        min-width: min-content;
    }

    .bottomNav--deraah [nav-id] {
        display: grid;
        grid-template-rows: 22px auto;
        justify-items: center;
        align-content: start;
        row-gap: 0.3rem;
        padding-inline: 0;
        font-size: clamp(0.6875rem, 3.2vw, 0.8125rem);
        white-space: nowrap;
    }

    .bottomNav--deraah [nav-id] > span,
    .bottomNav--deraah [nav-id] > div {
        margin: 0;
        line-height: 1.15;
    }

    .bottomNav--deraah [nav-id] > .header-icon {
        font-size: 22px;
        color: #000;
    }

    .bottomNav--deraah .active > .header-icon {
        color: #ba3373;
    }
}
