.citystar-header-main {
    grid-template-areas: "departments logo search actions language" !important;
    grid-template-columns: auto minmax(160px, 220px) minmax(280px, 1fr) auto auto !important;
}

.citystar-header-main > .citystar-menu-trigger {
    grid-area: departments;
}

.citystar-header-main > .citystar-header-brand {
    grid-area: logo;
}

.citystar-header-main > .citystar-header-search {
    grid-area: search;
}

.citystar-header-main > .citystar-header-actions {
    grid-area: actions;
}

/* ---- Language dropdown ---- */

.citystar-language-switcher {
    align-items: center;
    display: flex;
    grid-area: language;
    justify-content: center;
    min-width: 56px;
    position: relative;
    z-index: 1003;
}

.citystar-language-switcher__trigger {
    align-items: center;
    background: #fff;
    border: 1px solid #d7dbe2;
    border-radius: 999px;
    box-shadow: none;
    color: #071b4d;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 6px;
    justify-content: center;
    min-height: 40px;
    padding: 0 12px;
    white-space: nowrap;
}

.citystar-language-switcher__trigger:hover,
.citystar-language-switcher__trigger:focus {
    background: #fff;
    border-color: #e4002b;
    color: #e4002b;
}

.citystar-language-switcher__trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(7, 27, 77, .16);
    outline: 2px solid #071b4d;
    outline-offset: 2px;
}

/* Desktop shows the native name ("English"); narrow screens show the code ("EN"). */
.citystar-language-switcher__code {
    display: none;
    line-height: 1;
}

.citystar-language-switcher__current {
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.citystar-language-switcher__panel {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 18px 44px rgba(7, 27, 77, .2);
    box-sizing: border-box;
    inset-inline-end: 0;
    margin-top: 10px;
    max-width: calc(100vw - 24px);
    min-width: 220px;
    padding: 16px;
    position: absolute;
    top: 100%;
}

.citystar-language-switcher__panel[hidden] {
    display: none !important;
}

.citystar-language-switcher__title {
    color: #071b4d;
    display: block;
    font-size: 15px;
    margin-bottom: 10px;
}

.citystar-language-switcher__options {
    display: grid;
    gap: 8px;
}

.citystar-language-switcher__option {
    align-items: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-sizing: border-box;
    color: #071b4d;
    display: grid;
    gap: 10px;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    min-height: 48px;
    padding: 8px 12px;
    text-decoration: none;
}

a.citystar-language-switcher__option:hover,
a.citystar-language-switcher__option:focus,
a.citystar-language-switcher__option:visited {
    color: #071b4d;
    text-decoration: none;
}

a.citystar-language-switcher__option:hover,
a.citystar-language-switcher__option:focus {
    background: #f8fafc;
    border-color: #e4002b;
}

.citystar-language-switcher__option.is-current {
    background: #f0fdf4;
    border-color: #86efac;
}

.citystar-language-switcher__option-code {
    align-items: center;
    background: #f1f3f6;
    border-radius: 8px;
    display: inline-flex;
    font-size: 11px;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 34px;
}

.citystar-language-switcher__option.is-current .citystar-language-switcher__option-code {
    background: #dcfce7;
    color: #15803d;
}

.citystar-language-switcher__option-name {
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.citystar-language-switcher__check {
    color: #15803d;
    font-size: 16px;
    font-weight: 800;
}

@media only screen and (max-width: 1100px) and (min-width: 768px) {
    .citystar-header-main {
        gap: 12px;
        grid-template-columns: auto minmax(120px, 160px) minmax(220px, 1fr) auto auto !important;
    }
}

@media only screen and (max-width: 1180px) {
    .citystar-language-switcher,
    .citystar-language-switcher__trigger {
        min-width: 48px;
        width: auto;
    }

    .citystar-language-switcher__trigger {
        padding-left: 10px;
        padding-right: 10px;
    }

    .citystar-language-switcher__code {
        display: inline;
    }

    .citystar-language-switcher__current {
        display: none;
    }
}

@media only screen and (max-width: 767px) {
    .page-header .citystar-header-main {
        column-gap: 6px;
        grid-template-areas: "departments logo search language" !important;
        grid-template-columns: 44px 50px minmax(0, 1fr) 38px !important;
    }

    .page-header .citystar-language-switcher {
        min-width: 0;
        width: 38px;
    }

    .page-header .citystar-language-switcher__trigger {
        border-radius: 999px;
        box-sizing: border-box;
        font-size: 11px;
        font-weight: 800;
        height: 38px;
        line-height: 1;
        margin: 0;
        min-height: 38px;
        min-width: 38px;
        padding: 0;
        width: 38px;
    }

    .citystar-language-switcher__panel {
        margin-top: 8px;
    }
}

@media only screen and (max-width: 374px) {
    .page-header .citystar-header-main {
        grid-template-columns: 42px 46px minmax(0, 1fr) 36px !important;
    }

    .page-header .citystar-language-switcher,
    .page-header .citystar-language-switcher__trigger {
        min-width: 36px;
        width: 36px;
    }

    .page-header .citystar-language-switcher__trigger {
        height: 36px;
        min-height: 36px;
    }
}
