/* WPE WPML Language Switcher - Frontend Styles */

.wpe-wpml-language-switcher {
    margin: 15px 0;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
}

/* Alignment support */
.alignleft .wpe-wpml-language-switcher {
    justify-content: flex-start;
}

.aligncenter .wpe-wpml-language-switcher {
    justify-content: center;
}

.alignright .wpe-wpml-language-switcher {
    justify-content: flex-end;
}

/* Language links */
.wpe-lang-link {
    font-size: var(--wp--preset--font-size--small, 14px);
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 0px 5px 0px;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.wpe-lang-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    text-decoration: none;
}

/* Current language styling */
.wpe-lang-current {
    opacity: 0.6;
    cursor: default;
    font-weight: 600;
}

.wpe-lang-current:hover {
    background-color: transparent;
}

/* Language separator */
.wpe-lang-separator {
    color: #666;
    margin: 0px;
    font-size: 0.9em;
    opacity: 0.5;
}

/* Flag styling */
.wpe-lang-flag {
    width: 16px;
    height: 11px;
    object-fit: contain;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0, 0, 0, 0.2);
}

/* Language name */
.wpe-lang-name {
    line-height: 1;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Debug information */
.wpe-wpml-debug {
    margin-top: 20px;
    padding: 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.wpe-wpml-debug h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.wpe-wpml-debug pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    background-color: #fff;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid #e0e0e0;
    max-height: 400px;
    overflow-y: auto;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wpe-lang-link:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .wpe-lang-separator {
        color: #999;
    }
    
    .wpe-wpml-debug {
        background-color: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .wpe-wpml-debug h4 {
        color: #fff;
    }
    
    .wpe-wpml-debug pre {
        background-color: #1a1a1a;
        border-color: #333;
        color: #e0e0e0;
    }
}

/* Responsive styles */
@media (max-width: 768px) {
    .wpe-wpml-language-switcher {
        font-size: 14px;
    }
    
    .wpe-lang-link {
        padding: 4px 6px;
    }
}

/* Print styles */
@media print {
    .wpe-wpml-language-switcher {
        display: none;
    }
}