header {
    padding: 0 !important;
    min-height: 58px;
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 12px !important;
    box-sizing: border-box;
    flex-wrap: nowrap;
}

#logo {
    min-width: 0;
    padding-top: 0 !important;
    flex: 0 0 auto;
}

#logo img {
    max-width: 160px !important;
    height: auto;
    display: block;
}

.menu {
    margin-left: auto !important;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
    gap: 10px !important;
    padding: 0;
    margin: 0;
    min-width: 0;
    list-style: none;
    flex: 1 1 auto;
}

.menu li {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.menu a {
    white-space: nowrap;
    font-size: 14px !important;
}

#addToiletStyle {
    padding: 5px 12px !important;
}

html[lang="de"] .menu {
    gap: 8px !important;
}

html[lang="de"] #addToiletStyle {
    padding: 5px 10px !important;
}

html[lang="de"] .menu a {
    font-size: 12.5px !important;
}

.language-switcher {
    display: inline-flex;
    align-items: center;
    order: 3;
    position: relative;
    flex: 0 0 auto;
}

.language-switcher-controls {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 4px;
    border: 1px solid #ecd9c4;
    border-radius: 999px;
    background: #fff7ef;
}

.language-current-flag,
.language-dropdown-item {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
    flex: 0 0 auto;
}

.language-current-flag:hover,
.language-dropdown-item:hover {
    transform: translateY(-1px);
    background: #ffe5ca;
}

.language-current-flag {
    background: #F57C00;
    box-shadow: 0 6px 14px rgba(245, 124, 0, 0.25);
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
    background: #fff7ef;
    border: 1px solid #ecd9c4;
    border-radius: 18px;
    box-shadow: 0 12px 24px rgba(82, 41, 0, 0.12);
    z-index: 1500;
    max-width: calc(100vw - 24px);
}

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

@media (max-width: 768px) {
    header {
        min-height: 54px;
    }

    #logo img {
        max-width: 135px !important;
    }

    .menu {
        gap: 6px !important;
    }

    .menu a {
        font-size: 11.5px !important;
    }

    #addToiletStyle {
        padding: 4px 9px !important;
    }

    html[lang="de"] .menu {
        gap: 5px !important;
    }

    html[lang="de"] .menu a {
        font-size: 10px !important;
    }

    html[lang="de"] #addToiletStyle {
        padding: 4px 7px !important;
    }

    .language-switcher-controls {
        padding: 3px;
    }

    .language-current-flag,
    .language-dropdown-item {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 16px;
    }
}

@media (max-width: 560px) {
    #logo img {
        max-width: 118px !important;
    }

    .menu {
        gap: 5px !important;
    }

    .menu a {
        font-size: 10.5px !important;
    }

    #addToiletStyle {
        padding: 4px 7px !important;
    }

    html[lang="de"] .menu a {
        font-size: 9px !important;
    }

    html[lang="de"] #addToiletStyle {
        padding: 3px 6px !important;
    }

    .language-dropdown {
        right: 50%;
        transform: translateX(50%);
    }
}

@media (max-width: 380px) {
    #logo img {
        max-width: 104px !important;
    }

    .menu {
        gap: 4px !important;
    }

    .menu a {
        font-size: 9.5px !important;
    }

    html[lang="de"] .menu a {
        font-size: 8.5px !important;
    }

    #addToiletStyle {
        padding: 3px 6px !important;
    }
}
