/* Polylang Language Switcher - Simple gray button style */
.polylang-language-switcher {
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: relative;
    align-items: center;
}

.polylang-dropdown {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.polylang-current {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: transparent;
    border: 0;
    border-radius: 0;
    transition: all 0.2s ease;
    min-width: 34px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.polylang-current:hover {
    background: #eeeeee;
    border-color: #d0d0d0;
}

.polylang-current.active {
    background: #e8e8e8;
    border-color: #c0c0c0;
}

.polylang-selected {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.polylang-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.2s ease;
    margin-left: 6px;
}

.polylang-current.active .polylang-arrow {
    transform: rotate(180deg);
}

.polylang-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    margin-top: 2px;
    overflow: hidden;
    list-style: none;
    margin: 2px 0 0 0;
    padding: 0;
    min-width: 38px;
}

.polylang-options.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.polylang-options li {
    position: relative;
}

.polylang-options a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    font-size: 14px;
    font-weight: 500;
}

.polylang-options li:last-child a {
    border-bottom: none;
}

.polylang-options a:hover {
    background-color: #f5f5f5;
    color: #333;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .polylang-current {
        background: #404040;
        border-color: #555;
        color: #fff;
    }
    
    .polylang-current:hover {
        background: #4a4a4a;
        border-color: #666;
    }
    
    .polylang-current.active {
        background: #4a4a4a;
        border-color: #777;
    }
    
    .polylang-selected {
        color: #fff;
    }
    
    .polylang-arrow {
        color: #ccc;
    }
    
    .polylang-options {
        background: #404040;
        border-color: #555;
    }
    
    .polylang-options a {
        color: #fff;
    }
    
    .polylang-options a:hover {
        background-color: #4a4a4a;
        color: #fff;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .polylang-current {
        padding: 6px 10px 6px 10px;
        min-width: 30px;
        font-size: 13px;
    }
    
    .polylang-selected {
        font-size: 13px;
    }
    
    .polylang-arrow {
        font-size: 10px;
        margin-left: 0px;
    }
    
    .polylang-options a {
        padding: 6px 10px;
        font-size: 13px;
    }
}

/* RTL support */
[dir="rtl"] .polylang-language-switcher {
    direction: rtl;
}

[dir="rtl"] .polylang-current {
    text-align: right;
}

[dir="rtl"] .polylang-arrow {
    transform: scaleX(-1);
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .polylang-current.active .polylang-arrow {
    transform: scaleX(-1) rotate(180deg);
}

[dir="rtl"] .polylang-options a {
    text-align: right;
}

/* Simple dropdown styles (fallback) */
.polylang-simple-container {
    display: inline-block;
    position: relative;
}

.polylang-simple-dropdown {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 6px;
    padding: 8px 30px 8px 12px;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    cursor: pointer;
    min-width: 120px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    transition: all 0.2s ease;
}

.polylang-simple-dropdown:hover {
    border-color: #c1c7cd;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.polylang-simple-dropdown:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
}

.polylang-simple-dropdown option {
    padding: 8px 12px;
    background: #ffffff;
    color: #2c3e50;
}

/* Dark theme support for simple dropdown */
@media (prefers-color-scheme: dark) {
    .polylang-simple-dropdown {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23bdc3c7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    }
    
    .polylang-simple-dropdown:hover {
        border-color: #4a5f7a;
    }
    
    .polylang-simple-dropdown:focus {
        border-color: #3498db;
        box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
    }
    
    .polylang-simple-dropdown option {
        background: #2c3e50;
        color: #ecf0f1;
    }
}

/* Ultra simple polylang styles */
.ultra-simple-polylang {
    display: inline-block;
}

.ultra-simple-polylang ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 10px;
}

.ultra-simple-polylang li {
    display: inline-block;
}

.ultra-simple-polylang a {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    text-decoration: none;
    color: #2c3e50;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.ultra-simple-polylang a:hover {
    background: rgba(0, 0, 0, 0.1);
}

.ultra-simple-polylang img {
    width: 16px;
    height: 12px;
    border-radius: 2px;
}