.language-switch {
    position: relative;
    width: 30px;
    height: 30px;
    color: #f7f1ed;
    font-family: "Inter Tight", Arial, sans-serif;
    letter-spacing: 0;
}

.language-switch,
.language-switch * {
    box-sizing: border-box;
}

.language-switch .globe-trigger {
    display: flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #f7f1ed;
    background-color: transparent;
    cursor: pointer;
}

.language-switch .globe-trigger:hover,
.language-switch.is-open .globe-trigger {
    color: #c4c436;
    background-color: transparent;
}

.language-switch .globe-trigger:focus-visible {
    outline: 2px solid #e7e964;
    outline-offset: 2px;
}

.language-switch .globe-icon {
    display: block;
    width: 24px;
    height: 24px;
    background-color: currentColor;
    mask: url("../../images/mobile-menu/languages-globe-icon.svg") center / contain no-repeat;
    -webkit-mask: url("../../images/mobile-menu/languages-globe-icon.svg") center / contain no-repeat;
}

.language-switch .language-popover {
    position: absolute;
    z-index: 1000;
    top: calc(100% + 18px);
    left: 50%;
    width: 250px;
    height: auto;
    padding: 23px 17px;
    border-radius: 8px;
    visibility: hidden;
    color: #f7f1ed;
    background-color: #3f3f42;
    box-shadow: 4px 8px 24px -2px rgba(6, 6, 7, .8);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -6px);
    transition: opacity .2s ease, transform .2s ease, visibility 0s linear .2s;
}

.language-switch .language-popover::before {
    content: "";
    position: absolute;
    bottom: calc(100% - 5px);
    left: 50%;
    width: 10px;
    height: 10px;
    background-color: #3f3f42;
    transform: translateX(-50%) rotate(45deg);
}

.language-switch .language-popover h2 {
    position: relative;
    margin: 0 0 8px;
    color: #E3E3E8;
    font: inherit;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.25;
}

.language-switch .language-popover p {
    position: relative;
    margin: 0 0 16px;
    color: #E3E3E8;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.3;
}

.language-switch.is-open .language-popover {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
    transition-delay: 0s;
}

.language-switch .language-select {
    border-radius: 4px;
    position: relative;
}

.language-switch .language-select:focus-within {
    outline: 2px solid #e7e964;
    outline-offset: 2px;
}

.language-switch.is-select-open .language-select,
.language-switch.is-select-open .language-select-trigger {
    border-radius: 4px 4px 0 0;
}

.language-switch .language-select-trigger,
.language-switch .language-option {
    display: grid;
    width: 100%;
    min-height: 34px;
    grid-template-columns: 24px minmax(0, 1fr) 10px;
    align-items: center;
    column-gap: 7px;
    padding: 0 8px;
    border: 0;
    color: #f7f1ed;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.language-switch .language-name {
    grid-column: 2;
    min-width: 0;
    overflow: hidden;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.language-switch .language-select-trigger {
    border-radius: 4px;
    outline: 0;
    background-color: #18181b;
}

.language-switch .language-flag {
    display: flex;
    width: 24px;
    align-items: center;
    grid-column: 1;
}

.language-switch .language-flag img {
    display: block;
    width: 24px;
    height: auto;
}

.language-switch .select-icon {
    display: flex;
    width: 8px;
    height: 6px;
    grid-column: 3;
    justify-self: end;
    background-color: currentColor;
    mask: url("../../images/mobile-menu/down-chiv.svg") center / contain no-repeat;
    -webkit-mask: url("../../images/mobile-menu/down-chiv.svg") center / contain no-repeat;
    pointer-events: none;
    transition: transform .2s ease;
}

.language-switch.is-select-open .select-icon {
    transform: rotate(180deg);
}

.language-switch .language-options {
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 180px;
    margin: 0;
    padding: 4px 8px;
    overflow-y: auto;
    border-radius: 0 0 4px 4px;
    background-color: #18181b;
    box-shadow: 4px 8px 24px -2px rgba(6, 6, 7, .8);
    list-style: none;
}

.language-switch .language-options[hidden] {
    display: none;
}

.language-switch .language-option {
    min-height: 34px;
    grid-template-columns: 24px minmax(0, 1fr);
    padding: 5px 3px;
    border-radius: 4px;
    background-color: transparent;
}

.language-switch .language-option:hover,
.language-switch .language-option:focus-visible {
    color: #e7e964;
    background-color: #28282b;
    outline: 0;
}

@media (max-width: 1023px) {
    .language-switch {
        display: none !important;
    }
}
