/* Flaggen-Stile für den Sprachumschalter */
.flag-icon {
    display: inline-block !important;
    width: 20px !important;
    height: 15px !important;
    margin-right: 5px !important;
    vertical-align: middle !important;
    background-size: contain !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative !important;
}

/* Deutsche Flagge - direkte SVG-Einbindung */
.flag-de {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 5 3'%3E%3Cpath d='M0 0h5v1H0z' fill='%23000'/%3E%3Cpath d='M0 1h5v1H0z' fill='%23f00'/%3E%3Cpath d='M0 2h5v1H0z' fill='%23ffce00'/%3E%3C/svg%3E") !important;
}

/* Englische Flagge - direkte SVG-Einbindung */
.flag-en {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3Cclippath id='a'%3E%3Cpath d='M0 0v30h60V0z'/%3E%3C/clippath%3E%3Cpath d='M0 0v30h60V0z' fill='%23012169'/%3E%3Cpath d='M0 0l60 30m0-30L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0 0v30h60V0z' clip-path='url(%23a)' fill='none' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/svg%3E") !important;
}

/* Dropdown Sprachumschalter mit Animation */
.language-dropdown {
    position: relative;
    display: inline-block;
    height: 100%;
    display: flex;
    align-items: center;
}

.language-dropdown-toggle {
    display: flex;
    align-items: center;
    color: white;
    font-weight: 500;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: transparent;
    margin: 0 5px;
    height: 100%;
}

.language-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.language-dropdown-toggle::after {
    content: '';
    display: inline-block;
    margin-left: 8px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid white;
    transition: transform 0.3s ease;
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 8px 0;
    margin-top: 5px;
    min-width: 120px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    z-index: 1000;
}

.language-dropdown.show .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown.show .language-dropdown-toggle::after {
    transform: rotate(180deg);
}

.language-item {
    display: flex;
    align-items: center;
    padding: 8px 15px;
    color: white;
    text-decoration: none;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.language-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.language-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: bold;
}

/* Animation für Sprachumschaltung */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.language-item.active {
    animation: pulse 0.3s ease-in-out;
}

/* Mobile Anpassungen */
@media (max-width: 991px) {
    .language-dropdown {
        margin: 10px auto;
        display: block;
        text-align: center;
    }
    
    .language-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 5px;
        box-shadow: none;
        background-color: rgba(0, 0, 0, 0.5);
    }
    
    .language-dropdown-toggle {
        justify-content: center;
    }
}
