/* Floating Language Dropdown */
.floating-language {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    pointer-events: auto;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown-btn {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    border: 2px solid #e0e0e0;
}

.language-dropdown-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    border-color: #28a745;
}

.language-dropdown-btn img {
    width: 32px;
    height: 20px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.language-dropdown-btn i {
    font-size: 10px;
    color: #666;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.language-dropdown-btn.active i {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    right: 0;
    bottom: 50px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

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

.language-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

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

.language-option:hover {
    background: #f8f9fa;
    color: #28a745;
}

.language-option.active {
    background: #e8f5e8;
    color: #28a745;
    font-weight: 600;
}

.language-option img {
    width: 24px;
    height: 16px;
    margin-right: 12px;
    border-radius: 2px;
}

.language-option span {
    font-size: 14px;
    font-weight: 500;
}

/* Dropdown arrow - bottom pointing */
.language-dropdown-menu::before {
    content: '';
    position: absolute;
    bottom: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid white;
}

.language-dropdown-menu::after {
    content: '';
    position: absolute;
    bottom: -7px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-language {
        bottom: 15px;
        right: 15px;
    }
    
    .language-dropdown-btn {
        width: 55px;
        height: 38px;
    }
    
    .language-dropdown-btn img {
        width: 30px;
        height: 18px;
    }
    
    .language-dropdown-menu {
        min-width: 180px;
        right: -10px;
    }
}

@media (max-width: 480px) {
    .floating-language {
        bottom: 10px;
        right: 10px;
    }
    
    .language-dropdown-btn {
        width: 50px;
        height: 35px;
    }
    
    .language-dropdown-btn img {
        width: 28px;
        height: 16px;
    }
    
    .language-dropdown-menu {
        min-width: 160px;
        right: -5px;
    }
}
