.sundial-language-picker {
    position: relative;
    display: flex;
    width: min(100%, 14rem);
    margin: 0;
    color: #24292f;
    font-size: 1rem;
    line-height: 1.25;
    text-align: left;
}

.sundial-language-picker--home {
    --home-header-action-height: 35px;
    width: 100%;
    height: var(--home-header-action-height);
    margin: 0.25rem 0 0;
}

.home-header-actions-cell {
    width: 1%;
}

.home-header-actions-cell .header-actions {
    width: max-content;
}

.sundial-language-picker::before {
    content: "🌐";
    position: absolute;
    top: 50%;
    left: 0.65rem;
    z-index: 4;
    line-height: 1;
    pointer-events: none;
    transform: translateY(-50%);
}

.sundial-language-picker select.sundial-language-picker__select {
    width: 100%;
    min-height: 2.5rem;
    margin: 0;
    padding: 0.4rem 2rem 0.4rem 2.25rem;
    border: 1px solid #d0d7de;
    border-radius: 4px;
    background: #fff;
    color: #24292f;
    font: inherit;
}

.sundial-language-picker .ts-wrapper {
    width: 100%;
}

.sundial-language-picker div {
    margin-bottom: 0;
}

.sundial-language-picker .ts-control {
    min-height: 2.5rem;
    align-items: center;
    padding: 0.4rem 2rem 0.4rem 2.25rem;
    border-color: #d0d7de;
    border-radius: 4px;
    background: #fff;
    color: #24292f;
    font: inherit;
    line-height: 1.25;
}

.sundial-language-picker--home select.sundial-language-picker__select,
.sundial-language-picker--home .ts-wrapper,
.sundial-language-picker--home .ts-control {
    height: var(--home-header-action-height);
    min-height: var(--home-header-action-height);
}

.sundial-language-picker--home select.sundial-language-picker__select,
.sundial-language-picker--home .ts-control {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
}

.sundial-language-picker .ts-wrapper.focus .ts-control {
    border-color: #1779ba;
    box-shadow: 0 0 0 2px rgba(23, 121, 186, 0.25);
}

.sundial-language-picker .ts-control > input {
    min-width: 1rem;
    color: inherit;
    font: inherit;
}

.sundial-language-picker .ts-dropdown {
    z-index: 20;
    margin-top: 0.2rem;
    border-color: #d0d7de;
    border-radius: 4px;
    color: #24292f;
    font: inherit;
}

.sundial-language-picker .dropdown-input-wrap {
    position: relative;
}

.sundial-language-picker .dropdown-input {
    min-height: 2.5rem;
    margin: 0;
    color: #24292f;
    font: inherit;
}

.sundial-language-picker .ts-dropdown .active {
    background: #eaf3fa;
    color: #24292f;
}

.subpage-header.subpage-header--with-language-picker {
    display: flex;
    justify-content: flex-start;
}

.subpage-header--with-language-picker .subpage-header__store {
    margin-left: auto;
}

.subpage-header--with-language-picker .sundial-language-picker {
    --subpage-header-height: min(var(--subpage-header-max-height), 7vw);
    flex: 0 0 auto;
    width: fit-content;
    min-width: 0;
    max-width: min(14rem, 38vw);
    height: var(--subpage-header-height);
    margin: 0;
    font-size: clamp(0.75rem, calc(var(--subpage-header-height) * 0.4), 1rem);
}

.subpage-header--with-language-picker .sundial-language-picker::before {
    left: calc(var(--subpage-header-height) * 0.22);
}

.subpage-header--with-language-picker .sundial-language-picker .ts-wrapper,
.subpage-header--with-language-picker .sundial-language-picker .ts-control {
    width: fit-content;
    max-width: 100%;
    height: var(--subpage-header-height);
    min-height: var(--subpage-header-height);
}

.subpage-header--with-language-picker .sundial-language-picker .ts-control {
    flex-wrap: nowrap;
    padding-top: 0;
    padding-bottom: 0;
    padding-left: calc(var(--subpage-header-height) * 0.85);
}

.subpage-header--with-language-picker .sundial-language-picker .ts-control .item {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.subpage-header--with-language-picker .sundial-language-picker .ts-dropdown {
    right: 0;
    left: auto;
    width: min(14rem, calc(100vw - 2rem));
    min-width: 100%;
}

@supports (height: 1cqi) {
    .subpage-header--with-language-picker .subpage-header__brand,
    .subpage-header--with-language-picker .subpage-header__store {
        --subpage-header-height: min(var(--subpage-header-max-height), 7cqi);
    }

    .subpage-header--with-language-picker .sundial-language-picker {
        --subpage-header-height: min(var(--subpage-header-max-height), 7cqi);
        max-width: min(14rem, 38cqi);
    }
}

@media screen and (max-width: 39.9375em) {
    .subpage-header--with-language-picker .subpage-header__brand,
    .subpage-header--with-language-picker .subpage-header__store,
    .subpage-header--with-language-picker .sundial-language-picker {
        --subpage-header-height: min(var(--subpage-header-max-height), 6vw);
    }

    @supports (height: 1cqi) {
        .subpage-header--with-language-picker .subpage-header__brand,
        .subpage-header--with-language-picker .subpage-header__store,
        .subpage-header--with-language-picker .sundial-language-picker {
            --subpage-header-height: min(var(--subpage-header-max-height), 6cqi);
        }
    }
}

@media screen and (min-width: 40em) {
    .sundial-language-picker--home {
        --home-header-action-height: 38px;
    }

    .home-header-actions-cell .header-actions .appstore {
        box-sizing: content-box;
        min-height: 33px;
        max-height: 33px;
    }
}

@media screen and (min-width: 64em) {
    .sundial-language-picker--home {
        --home-header-action-height: 35px;
    }

    .home-header-actions-cell .header-actions .appstore {
        min-height: 50px;
        max-height: 50px;
    }
}
