/* Multilingual Language Switcher Styles */

.qr-language-switcher {
    display: inline-block;
    margin: 10px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Dropdown Style */
.qr-lang-style-dropdown .qr-language-select {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.qr-lang-style-dropdown .qr-language-select:hover {
    border-color: #007cba;
    box-shadow: 0 2px 8px rgba(0, 124, 186, 0.15);
}

.qr-lang-style-dropdown .qr-language-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Button Style */
.qr-lang-style-buttons .qr-language-buttons {
    display: flex;
    gap: 4px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qr-lang-btn {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 60px;
    justify-content: center;
}

.qr-lang-btn:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.qr-lang-btn.active {
    background: #007cba;
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.3);
}

.qr-lang-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.2);
}

/* Flag Style */
.qr-lang-style-flags .qr-language-buttons {
    display: flex;
    gap: 8px;
}

.qr-lang-style-flags .qr-lang-btn {
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qr-lang-style-flags .qr-lang-btn:hover {
    border-color: #007cba;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.qr-lang-style-flags .qr-lang-btn.active {
    border-color: #007cba;
    background: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .qr-language-switcher {
        width: 100%;
        text-align: center;
    }
    
    .qr-lang-style-dropdown .qr-language-select {
        width: 100%;
        max-width: 200px;
    }
    
    .qr-language-buttons {
        justify-content: center;
    }
    
    .qr-lang-btn {
        flex: 1;
        max-width: 80px;
    }
}

/* Animation Effects */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.qr-language-switcher {
    animation: fadeIn 0.5s ease;
}

/* Loading State */
.qr-language-switcher.loading {
    opacity: 0.6;
    pointer-events: none;
}

.qr-language-switcher.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #007cba;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Integration with Popular Themes */

/* WoodMart Theme */
.woodmart-theme .qr-language-switcher {
    margin: 15px 0;
}

.woodmart-theme .qr-lang-btn {
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Astra Theme */
.astra-theme .qr-language-switcher {
    display: inline-flex;
    align-items: center;
}

/* OceanWP Theme */
.oceanwp-theme .qr-language-switcher {
    vertical-align: middle;
}

/* GeneratePress Theme */
.generatepress-theme .qr-lang-btn {
    border-radius: 4px;
}

/* Header Integration */
.site-header .qr-language-switcher,
.header-widget .qr-language-switcher {
    margin: 0;
}

.site-header .qr-lang-btn,
.header-widget .qr-lang-btn {
    padding: 6px 12px;
    font-size: 13px;
}

/* Footer Integration */
.site-footer .qr-language-switcher {
    margin: 10px 0;
}

.site-footer .qr-lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.site-footer .qr-lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.site-footer .qr-lang-btn.active {
    background: #007cba;
    color: #fff;
}

/* Widget Integration */
.widget .qr-language-switcher {
    width: 100%;
    text-align: center;
    margin: 15px 0;
}

.widget .qr-language-buttons {
    justify-content: center;
}

/* Elementor Integration */
.elementor-widget-container .qr-language-switcher {
    margin: 0;
}

/* RTL Support */
.rtl .qr-language-buttons {
    direction: rtl;
}

.rtl .qr-lang-btn {
    direction: ltr;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .qr-lang-btn {
        border: 2px solid currentColor;
    }
    
    .qr-lang-btn.active {
        background: #000;
        color: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .qr-lang-btn,
    .qr-language-select {
        transition: none;
    }
    
    .qr-language-switcher {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .qr-language-select {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .qr-language-buttons {
        background: #2d3748;
    }
    
    .qr-lang-btn {
        color: #a0aec0;
    }
    
    .qr-lang-btn:hover {
        background: #4a5568;
        color: #e2e8f0;
    }
    
    .qr-lang-style-flags .qr-lang-btn {
        background: #2d3748;
        border-color: #4a5568;
    }
}

/* Print Styles */
@media print {
    .qr-language-switcher {
        display: none;
    }
}