.khls,
.khls-menu,
.khls-backdrop {
    --khls-btn-bg: rgba(17, 24, 39, .035);
    --khls-btn-bg-hover: rgba(17, 24, 39, .075);
    --khls-btn-border: #d5dae2;
    --khls-btn-border-hover: #a9b3c2;
    --khls-btn-text: #1f2937;
    --khls-panel-bg: #ffffff;
    --khls-panel-border: #e3e6ec;
    --khls-panel-shadow: 0 28px 64px -16px rgba(16, 24, 40, .28), 0 4px 16px rgba(16, 24, 40, .08);
    --khls-item-text: #1f2937;
    --khls-item-hover: rgba(17, 24, 39, .06);
    --khls-active-bg: #1f6feb;
    --khls-active-bg-hover: #1a5fd0;
    --khls-active-text: #ffffff;
    --khls-muted: #5b6472;
    --khls-flag-ring: rgba(0, 0, 0, .16);
    --khls-focus: #1f6feb;
    --khls-scroll: rgba(16, 24, 40, .22);
    --khls-backdrop: rgba(15, 23, 42, .45);
    --khls-login-bg: #ffffff;
    --khls-login-bg-hover: #f4f6f9;
    --khls-login-shadow: 0 1px 3px rgba(16, 24, 40, .12);
}

html[data-theme="dark"] .khls,
html[data-theme="dark"] .khls-menu,
html[data-theme="dark"] .khls-backdrop {
    --khls-btn-bg: rgba(255, 255, 255, .06);
    --khls-btn-bg-hover: rgba(255, 255, 255, .12);
    --khls-btn-border: rgba(255, 255, 255, .14);
    --khls-btn-border-hover: rgba(255, 255, 255, .28);
    --khls-btn-text: #f2f3f5;
    --khls-panel-bg: #1e1f22;
    --khls-panel-border: rgba(255, 255, 255, .12);
    --khls-panel-shadow: 0 28px 64px -16px rgba(0, 0, 0, .75), 0 4px 16px rgba(0, 0, 0, .45);
    --khls-item-text: #dbdee1;
    --khls-item-hover: rgba(255, 255, 255, .07);
    --khls-muted: #b5bac1;
    --khls-flag-ring: rgba(255, 255, 255, .14);
    --khls-focus: #79b8ff;
    --khls-scroll: rgba(255, 255, 255, .22);
    --khls-backdrop: rgba(0, 0, 0, .55);
    --khls-login-bg: rgba(255, 255, 255, .06);
    --khls-login-bg-hover: rgba(255, 255, 255, .12);
    --khls-login-shadow: none;
}

.sm-header-container .sm-options ul.sm-option-menu > li.khls-li {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 8px;
    line-height: normal;
}

.sm-header-container .sm-options:has(.khls) li.sm-language,
.sm-login-box:has(.khls) a[data-target="#languageChooserModal"] {
    display: none !important;
}

.khls {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: "Open Sans", Arial, sans-serif;
    text-align: left;
    vertical-align: middle;
}

.khls .khls-btn {
    -webkit-appearance: none;
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-sizing: border-box;
    height: 34px;
    margin: 0;
    padding: 0 10px 0 9px;
    border: 1px solid var(--khls-btn-border);
    border-radius: 8px;
    background: var(--khls-btn-bg);
    box-shadow: none;
    color: var(--khls-btn-text);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .3px;
    text-transform: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}

.khls .khls-btn:hover,
.khls.khls-open .khls-btn {
    background: var(--khls-btn-bg-hover);
    border-color: var(--khls-btn-border-hover);
    color: var(--khls-btn-text);
}

.khls .khls-btn:focus {
    outline: none;
}

.khls .khls-btn:focus-visible {
    outline: 2px solid var(--khls-focus);
    outline-offset: 2px;
}

.khls .khls-btn:active {
    transform: scale(.97);
}

.khls .khls-flag {
    display: block;
    flex: 0 0 auto;
    overflow: hidden;
}

.khls .khls-btn .khls-flag {
    width: 18px;
    height: 12px;
    border-radius: 2px;
    box-shadow: 0 0 0 1px var(--khls-flag-ring);
}

.khls .khls-flag--globe,
.khls .khls-btn .khls-flag--globe {
    width: 15px;
    height: 15px;
    border-radius: 0;
    box-shadow: none;
}

.khls .khls-code {
    display: inline-block;
    min-width: 1.6em;
    text-align: left;
}

.khls .khls-text {
    display: inline-block;
    max-width: 14em;
    overflow: hidden;
    text-overflow: ellipsis;
}

.khls .khls-caret {
    display: block;
    flex: 0 0 auto;
    opacity: .8;
    transition: transform .2s ease;
}

.khls.khls-open .khls-caret {
    transform: rotate(180deg);
}

.khls .khls-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    bottom: auto;
    z-index: 1060;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    box-sizing: border-box;
    width: 400px;
    width: min(400px, calc(100vw - 24px));
    max-height: 560px;
    max-height: min(calc(100vh - 96px), 560px);
    margin: 0;
    padding: 10px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    list-style: none;
    background: var(--khls-panel-bg);
    border: 1px solid var(--khls-panel-border);
    border-radius: 16px;
    box-shadow: var(--khls-panel-shadow);
    visibility: hidden;
    transform: translateY(-6px);
    transition: transform .16s ease, visibility .16s;
    scrollbar-width: thin;
    scrollbar-color: var(--khls-scroll) transparent;
}

.khls.khls-open .khls-menu {
    visibility: visible;
    transform: translateY(0);
    transition: transform .16s ease, visibility 0s;
}

.khls .khls-menu > li {
    display: block;
    float: none;
    margin: 0;
    padding: 0;
    line-height: normal;
    list-style: none;
    background: none;
}

.khls .khls-menu > li::before,
.khls .khls-menu > li::marker {
    content: none;
    display: none;
}

.khls .khls-menu::-webkit-scrollbar {
    width: 6px;
}

.khls .khls-menu::-webkit-scrollbar-track {
    background: transparent;
}

.khls .khls-menu::-webkit-scrollbar-thumb {
    background: var(--khls-scroll);
    border-radius: 99px;
}

.khls .khls-item {
    display: flex;
    align-items: center;
    gap: 10px;
    box-sizing: border-box;
    min-height: 40px;
    padding: 10px 12px;
    border-radius: 10px;
    overflow: hidden;
    color: var(--khls-item-text);
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: .01em;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .14s ease, color .14s ease;
}

.khls .khls-item:hover,
.khls .khls-item:focus {
    background: var(--khls-item-hover);
    color: var(--khls-item-text);
    text-decoration: none;
    outline: none;
}

.khls .khls-item:focus-visible {
    outline: 2px solid var(--khls-focus);
    outline-offset: -2px;
}

.khls .khls-item.khls-active,
.khls .khls-item.khls-active:visited {
    background: var(--khls-active-bg);
    color: var(--khls-active-text);
    font-weight: 600;
}

.khls .khls-item.khls-active:hover,
.khls .khls-item.khls-active:focus {
    background: var(--khls-active-bg-hover);
    color: var(--khls-active-text);
}

.khls .khls-item.khls-active:focus-visible {
    outline-color: var(--khls-active-text);
}

#khls-menu-header .khls-item,
#khls-menu-login .khls-item,
#khls-menu-header .khls-item:hover,
#khls-menu-login .khls-item:hover,
#khls-menu-header .khls-item:focus,
#khls-menu-login .khls-item:focus {
    color: var(--khls-item-text) !important;
    text-decoration: none !important;
}

#khls-menu-header .khls-item.khls-active,
#khls-menu-login .khls-item.khls-active,
#khls-menu-header .khls-item.khls-active:hover,
#khls-menu-login .khls-item.khls-active:hover,
#khls-menu-header .khls-item.khls-active:focus,
#khls-menu-login .khls-item.khls-active:focus {
    color: var(--khls-active-text) !important;
}

.khls .khls-item .khls-flag {
    width: 20px;
    height: 14px;
    border-radius: 3px;
    box-shadow: 0 0 0 1px var(--khls-flag-ring);
}

.khls .khls-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.khls .khls-item:lang(ar) .khls-name {
    font-size: 1.15em;
}

.khls .khls-region {
    flex: 0 0 auto;
    padding: 3px 5px;
    border-radius: 5px;
    background: var(--khls-item-hover);
    color: var(--khls-muted);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .05em;
}

.khls .khls-item.khls-active .khls-region {
    background: rgba(255, 255, 255, .22);
    color: var(--khls-active-text);
}

.khls .khls-backdrop {
    display: none;
}

html:not(.khls-js) .khls:focus-within .khls-menu {
    visibility: visible;
    transform: none;
}

.khls-login {
    margin-top: 18px;
    text-align: center;
}

body.login.khls-login-space {
    height: auto;
    min-height: 100vh;
}

.khls--login .khls-btn {
    height: 38px;
    padding: 0 14px 0 12px;
    gap: 9px;
    background: var(--khls-login-bg);
    box-shadow: var(--khls-login-shadow);
    font-size: 13px;
    letter-spacing: .1px;
}

.khls--login .khls-btn:hover,
.khls--login.khls-open .khls-btn {
    background: var(--khls-login-bg-hover);
}

.khls--login .khls-menu {
    top: auto;
    bottom: calc(100% + 10px);
    left: 50%;
    right: auto;
    margin-left: -200px;
    margin-left: calc(min(400px, 100vw - 24px) / -2);
    transform: translateY(6px);
}

.khls--login.khls-open .khls-menu {
    transform: translateY(0);
}

html[dir="rtl"] .khls {
    text-align: right;
}

html[dir="rtl"] .khls .khls-menu {
    right: auto;
    left: 0;
}

html[dir="rtl"] .khls .khls-item,
html[dir="rtl"] .khls .khls-code {
    text-align: right;
}

html[dir="rtl"] .khls--login .khls-menu {
    left: 50%;
}

body.khls-menu-open .kh-chat-bubble,
body.khls-menu-open .kh-chat-teaser,
body.khls-menu-open #kh-cookie-banner {
    visibility: hidden !important;
}

@media only screen and (max-width: 768px) {
    .sm-header-container .sm-options ul.sm-option-menu > li.khls-li {
        position: absolute;
        top: -60px;
        right: 12px;
        z-index: 2;
        height: 60px;
        padding: 0;
    }

    html[dir="rtl"] .sm-header-container .sm-options ul.sm-option-menu > li.khls-li {
        right: auto;
        left: 12px;
    }
}

@media only screen and (max-width: 359px) {
    .sm-header-container:has(li.khls-li) .sm-brand .sm-logo img {
        max-width: calc(100vw - 152px);
        height: auto;
    }
}

@media (max-width: 575px) {
    .khls .khls-menu,
    .khls--login .khls-menu,
    html[dir="rtl"] .khls .khls-menu,
    html[dir="rtl"] .khls--login .khls-menu {
        position: fixed;
        top: auto;
        right: 12px;
        bottom: 12px;
        left: 12px;
        z-index: 1061;
        width: auto;
        max-height: calc(100vh - 120px);
        max-height: min(calc(100vh - 120px), 560px);
        max-height: min(calc(100dvh - 120px), 560px);
        margin: 0;
        transform: translateY(12px);
    }

    .khls.khls-open .khls-menu {
        transform: translateY(0);
    }

    .khls .khls-backdrop {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1060;
        background: var(--khls-backdrop);
        opacity: 0;
        visibility: hidden;
        transition: opacity .16s ease, visibility .16s;
    }

    .khls.khls-open .khls-backdrop {
        opacity: 1;
        visibility: visible;
        transition: opacity .16s ease, visibility 0s;
    }

    .khls .khls-item {
        min-height: 44px;
        padding: 11px 10px;
        gap: 8px;
        font-size: 14px;
    }

    .khls .khls-item .khls-flag {
        width: 18px;
        height: 12px;
    }

    html.khls-lock,
    html.khls-lock body {
        overflow: hidden;
    }
}

@media (max-width: 575px) and (max-height: 640px) {
    .khls .khls-menu,
    .khls--login .khls-menu,
    html[dir="rtl"] .khls .khls-menu,
    html[dir="rtl"] .khls--login .khls-menu {
        max-height: calc(100vh - 88px);
        max-height: min(calc(100vh - 88px), 560px);
        max-height: min(calc(100dvh - 88px), 560px);
    }

    .khls .khls-item {
        min-height: 40px;
        padding-top: 9px;
        padding-bottom: 9px;
    }
}

@media (max-width: 374px) {
    .khls--header .khls-code {
        display: none;
    }

    .khls--header .khls-btn {
        gap: 6px;
        padding: 0 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .khls .khls-btn,
    .khls .khls-caret,
    .khls .khls-menu,
    .khls.khls-open .khls-menu,
    .khls .khls-item,
    .khls .khls-backdrop,
    .khls.khls-open .khls-backdrop {
        transition: none;
    }
}
