/* ===== LANGUAGE BUTTON CONTAINER ===== */

.language-button-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ===== LANGUAGE BUTTON - ERBT STYLES VON .sidebar button ===== */

.language-current {
    /* Erbt alle Styles von .sidebar button automatisch */
    gap: 6px;
}

/* Erbt alle Effekte von .sidebar button automatisch */

/* ===== LANGUAGE BUTTON CONTENT ===== */

.flag-icon {
    font-size: 1em;
    width: 18px;
    text-align: center;
}

.language-name {
    font-size: 0.9em;
    white-space: nowrap;
    transition: opacity 0.3s, width 0.3s;
}

.language-current i {
    font-size: 0.8em;
    transition: transform 0.3s ease;
    opacity: 0.8;
}

.language-current:hover i {
    transform: rotate(180deg);
    opacity: 1;
}

/* ===== LANGUAGE DROPDOWN ===== */

.language-dropdown {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: none;
    z-index: 1000;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    width: 120px;
}

.language-dropdown.show {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(15px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

.language-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #333;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.1) 0%, rgba(25, 118, 210, 0.05) 100%);
    color: #1976d2;
    transform: translateX(4px);
}

.language-option.active {
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.15) 0%, rgba(25, 118, 210, 0.1) 100%);
    color: #1976d2;
    font-weight: 600;
    border-left: 3px solid #1976d2;
}

.language-option .flag-icon {
    font-size: 1.3em;
    width: 24px;
    text-align: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.language-option:hover .flag-icon {
    transform: scale(1.1);
}

.language-option span:last-child {
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.language-option:hover span:last-child {
    font-weight: 600;
}

/* ===== COLLAPSED SIDEBAR ===== */

.sidebar.collapsed .language-name {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .language-current i {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .sidebar-language-selector {
        padding: 12px 15px;
    }
    
    .language-current {
        padding: 8px 10px;
    }
    
    .language-name {
        font-size: 0.85em;
    }
    
    .language-dropdown {
        margin-bottom: 8px;
    }
    
    .language-option {
        padding: 12px 16px;
    }
}

/* Mobile (unter 768px) */
@media (max-width: 767px) {
    .sidebar-language-selector {
        padding: 10px 20px 20px 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .language-current {
        width: 30px;
        padding: 10px;
    }
    
    .language-name {
        opacity: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    
    .language-current i {
        opacity: 0 !important;
        width: 0 !important;
        overflow: hidden !important;
    }
    
    /* Mobile Overlay-Modus - wenn Sidebar ausgeklappt */
    .sidebar:not(.collapsed) .language-current {
        width: 120px !important;
        margin: 5px 0 !important;
    }
    
    .sidebar:not(.collapsed) .language-name {
        opacity: 1 !important;
        width: auto !important;
    }
    
    .sidebar:not(.collapsed) .language-current i {
        opacity: 1 !important;
        width: auto !important;
    }
    
    .language-dropdown {
        position: fixed;
        bottom: 20px;
        left: 20px;
        right: 20px;
        margin-bottom: 0;
        border-radius: 16px;
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(25px);
    }
    
    .language-option {
        padding: 16px 18px;
        font-size: 1em;
        border-radius: 8px;
        margin: 4px 8px;
    }
    
    .language-option .flag-icon {
        font-size: 1.4em;
    }
    
    .language-option:hover {
        transform: translateX(6px);
    }
}

/* Very Small Mobile (unter 480px) */
@media (max-width: 479px) {
    .sidebar-language-selector {
        padding: 8px 12px;
    }
    
    .language-current {
        width: 30px;
        padding: 10px;
    }
    
    .language-dropdown {
        left: 10px;
        right: 10px;
        bottom: 15px;
    }
    
    .language-option {
        padding: 12px 14px;
        font-size: 0.9em;
    }
}

/* ===== DARK MODE SUPPORT ===== */

@media (prefers-color-scheme: dark) {
    .language-dropdown {
        background: #2d3748;
        border: 1px solid #4a5568;
    }
    
    .language-option {
        color: #e2e8f0;
        border-bottom-color: #4a5568;
    }
    
    .language-option:hover {
        background-color: #4a5568;
        color: #63b3ed;
    }
    
    .language-option.active {
        background-color: #2b6cb0;
        color: #bee3f8;
    }
}

/* ===== ACCESSIBILITY ===== */

.language-current:focus {
    outline: none;
    box-shadow: none;
}

.language-option:focus {
    outline: 2px solid #1976d2;
    outline-offset: -2px;
}

/* ===== PRINT STYLES ===== */

@media print {
    .sidebar-language-selector {
        display: none;
    }
} 