/* WPML Language Switcher Popup Styles */

.wpml-language-switcher-container {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    z-index: 1000;
}

/* Trigger Button Styles */
.wpml-language-switcher-trigger {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    min-width: 120px;
    justify-content: space-between;
}

.wpml-language-switcher-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.wpml-language-switcher-trigger:active {
    transform: translateY(0);
}

/* Flag Icon Styles */
.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.current-language-flag .flag-icon {
    width: 20px;
    height: 15px;
}

/* Dropdown Arrow */
.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.wpml-language-switcher-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Popup Styles */
.wpml-language-switcher-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 250px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.wpml-language-switcher-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.wpml-language-switcher-popup-content {
    padding: 0;
}

/* Popup Header */
.wpml-language-switcher-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.wpml-language-switcher-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.close-popup {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-popup:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Language Options */
.wpml-language-switcher-languages {
    padding: 8px 0;
}

.wpml-language-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    position: relative;
}

.wpml-language-option:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #333;
}

.wpml-language-option.current-language {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.wpml-language-option.current-language:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    color: white;
}

.wpml-language-option .language-name {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}

.wpml-language-option .flag-icon {
    width: 24px;
    height: 18px;
    flex-shrink: 0;
}

.current-indicator {
    font-size: 16px;
    color: #4CAF50;
    font-weight: bold;
}

.wpml-language-option.current-language .current-indicator {
    color: white;
}

/* Inline Style */
.wpml-language-switcher-inline {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.wpml-language-switcher-inline .wpml-language-option {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 8px 12px;
    min-width: auto;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.wpml-language-switcher-inline .wpml-language-option:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wpml-language-switcher-inline .wpml-language-option.current-language {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
}

.wpml-language-switcher-inline .wpml-language-option .flag-icon {
    width: 20px;
    height: 15px;
}

.wpml-language-switcher-inline .wpml-language-option .language-name {
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wpml-language-switcher-popup {
        position: fixed;
        top: 50%;
        left: 50%;
        right: auto;
        transform: translate(-50%, -50%) scale(0.9);
        min-width: 280px;
        max-width: 90vw;
        margin: 0;
    }
    
    .wpml-language-switcher-popup.active {
        transform: translate(-50%, -50%) scale(1);
    }
    
    .wpml-language-switcher-trigger {
        padding: 10px 14px;
        font-size: 13px;
        min-width: 100px;
    }
    
    .wpml-language-switcher-inline {
        justify-content: center;
        gap: 6px;
    }
    
    .wpml-language-switcher-inline .wpml-language-option {
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .wpml-language-switcher-popup {
        min-width: 260px;
    }
    
    .wpml-language-option {
        padding: 10px 16px;
    }
    
    .wpml-language-option .language-name {
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wpml-language-switcher-popup {
        background: #2d3748;
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    .wpml-language-switcher-header {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .wpml-language-switcher-header h3 {
        color: #e2e8f0;
    }
    
    .close-popup {
        color: #a0aec0;
    }
    
    .close-popup:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
    
    .wpml-language-option {
        color: #e2e8f0;
    }
    
    .wpml-language-option:hover {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        color: #e2e8f0;
    }
    
    .wpml-language-switcher-inline .wpml-language-option {
        background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
        border-color: rgba(255, 255, 255, 0.1);
        color: #e2e8f0;
    }
    
    .wpml-language-switcher-inline .wpml-language-option:hover {
        background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    }
}

/* Animation for smooth transitions */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wpml-language-switcher-popup.active .wpml-language-option {
    animation: fadeInUp 0.3s ease forwards;
}

.wpml-language-switcher-popup.active .wpml-language-option:nth-child(1) { animation-delay: 0.1s; }
.wpml-language-switcher-popup.active .wpml-language-option:nth-child(2) { animation-delay: 0.15s; }
.wpml-language-switcher-popup.active .wpml-language-option:nth-child(3) { animation-delay: 0.2s; }
.wpml-language-switcher-popup.active .wpml-language-option:nth-child(4) { animation-delay: 0.25s; }
.wpml-language-switcher-popup.active .wpml-language-option:nth-child(5) { animation-delay: 0.3s; }
