.hegau-city {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    z-index: 9999;
}

.hegau-city__trigger {
    display: flex;
    align-items: center;
    gap: 9px;

    min-width: 285px;
    height: 52px;
    padding: 0 16px;

    box-sizing: border-box;

    border: 1px solid #dce5ec;
    border-radius: 15px;

    background: #ffffff;
    color: #20364d;

    font-family: inherit;
    font-size: 15px;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 3px 12px rgba(30, 60, 90, 0.05);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.hegau-city__trigger:hover,
.hegau-city.is-open .hegau-city__trigger {
    border-color: #cbd9e3;
    box-shadow: 0 5px 18px rgba(30, 60, 90, 0.09);
}

.hegau-city__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 21px;
    height: 21px;
    flex: 0 0 21px;
}

.hegau-city__icon img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.hegau-city__label {
    color: #718198;
    white-space: nowrap;
}

.hegau-city__current {
    font-weight: 700;
    color: #20364d;
    white-space: nowrap;
}

.hegau-city__arrow {
    margin-left: auto;

    font-size: 17px;
    line-height: 1;

    color: #64788d;

    transition: transform 0.2s ease;
}

.hegau-city.is-open .hegau-city__arrow {
    transform: rotate(180deg);
}

.hegau-city__dropdown {
    position: absolute;
    top: calc(100% + 9px);
    left: 0;

    width: 304px;
    padding: 14px;

    box-sizing: border-box;

    background: #ffffff;
    border: 1px solid #e3eaf0;
    border-radius: 18px;

    box-shadow:
        0 18px 45px rgba(25, 55, 80, 0.14),
        0 4px 12px rgba(25, 55, 80, 0.06);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transform: translateY(-5px);

    transition:
        opacity 0.18s ease,
        visibility 0.18s ease,
        transform 0.18s ease;

    z-index: 10000;
}

.hegau-city.is-open .hegau-city__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.hegau-city__title {
    padding: 5px 10px 12px;

    color: #20364d;

    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;
}

.hegau-city__options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hegau-city__option {
    display: flex;
    align-items: center;

    min-height: 39px;
    padding: 0 10px;

    box-sizing: border-box;

    border-radius: 11px;

    text-decoration: none;

    color: #20364d;

    font-size: 14px;
    line-height: 1.3;
    font-weight: 500;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.hegau-city__option:hover {
    background: #f3f8f5;
}

.hegau-city__option.is-active {
    background: #eaf5ec;
    color: #16833a;
    font-weight: 700;
}

.hegau-city__check {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;

    width: 24px;
    min-width: 24px;
    margin-right: 2px;

    color: transparent;

    font-size: 19px;
    line-height: 1;
    font-weight: 700;
}

.hegau-city__option.is-active .hegau-city__check {
    color: #16833a;
}

.hegau-city__name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hegau-city__divider {
    height: 1px;
    margin: 9px 6px;
    background: #e5ebf0;
}

.hegau-city__auto {
    display: flex;
    align-items: center;
    gap: 9px;

    width: 100%;
    min-height: 39px;
    padding: 0 10px;

    box-sizing: border-box;

    border: 0;
    border-radius: 11px;

    background: transparent;
    color: #536b80;

    font-family: inherit;
    font-size: 13px;
    line-height: 1.3;
    text-align: left;

    cursor: pointer;

    transition:
        background-color 0.15s ease,
        color 0.15s ease;
}

.hegau-city__auto:hover {
    background: #f3f8f5;
    color: #16833a;
}

.hegau-city__auto-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    min-width: 18px;

    font-size: 18px;
    line-height: 1;
}

/*
 * Header overflow and stacking.
 * Required so the city dropdown is not clipped.
 */
.hegau-header,
.hegau-header .hegau-container,
.hegau-header__top,
.hegau-header__left,
.hegau-city {
    overflow: visible !important;
}

.hegau-header {
    position: relative;
    z-index: 100;
}

.hegau-header__top {
    position: relative;
    z-index: 101;
}

.hegau-header__left {
    position: relative;
    z-index: 102;
}

@media (max-width: 900px) {
    .hegau-city__trigger {
        min-width: 240px;
    }

    .hegau-city__dropdown {
        width: 285px;
    }
}

@media (max-width: 700px) {
    .hegau-city__trigger {
        min-width: 0;
        width: auto;
    }

    .hegau-city__label {
        display: none;
    }

    .hegau-city__dropdown {
        left: 0;
        width: min(304px, calc(100vw - 30px));
    }
}
