/* WGR Language Switcher Styles */

.wgr-switcher {
    position: relative;
    display: inline-block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    line-height: 1.5;
    z-index: 999999;
}

.wgr-switcher__trigger {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #333;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    white-space: nowrap;
}

.wgr-switcher__trigger:hover {
    border-color: #bbb;
    background: #f9f9f9;
}

.wgr-switcher__trigger:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.wgr-flag {
    display: block;
    width: 20px;
    height: 14px;
    object-fit: cover;
    box-shadow: 0 0 1px rgba(0,0,0,0.5);
}

.wgr-switcher__arrow {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.2s ease;
}

.wgr-switcher--open .wgr-switcher__arrow {
    transform: rotate(180deg);
}

.wgr-switcher__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    margin: 8px 0 0 0;
    padding: 8px 0;
    list-style: none;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 160px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.wgr-switcher--open .wgr-switcher__dropdown {
    display: block;
}

/* Floating positions */
.wgr-floating {
    position: fixed;
    z-index: 999999;
}

.wgr-floating--bottom-right { bottom: 20px; right: 20px; }
.wgr-floating--bottom-left { bottom: 20px; left: 20px; }
.wgr-floating--top-right { top: 20px; right: 20px; }
.wgr-floating--top-left { top: 20px; left: 20px; }

/* Invert dropdown for bottom positions */
.wgr-floating--bottom-right .wgr-switcher__dropdown,
.wgr-floating--bottom-left .wgr-switcher__dropdown {
    top: auto;
    bottom: 100%;
    margin: 0 0 8px 0;
}

.wgr-floating--bottom-right .wgr-switcher__dropdown,
.wgr-floating--top-right .wgr-switcher__dropdown {
    left: auto;
    right: 0;
}

.wgr-switcher__item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    text-decoration: none;
    color: #444;
    font-size: 14px;
    transition: background 0.1s ease;
}

.wgr-switcher__item a:hover {
    background: #f0f0f0;
    color: #000;
}

.wgr-switcher__item--active a {
    font-weight: 600;
    background: #f8f8f8;
}

.wgr-switcher__check {
    margin-left: auto;
    color: #46b450;
    font-size: 12px;
}

/* Nav Menu Styles */
.wgr-menu-item .wgr-switcher__trigger {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
}

.wgr-menu-item .wgr-switcher__trigger:hover {
    background: transparent;
}

/* Custom styles for professional look */
.wgr-switcher__trigger {
    border-radius: 30px; /* Modern rounded look */
    padding: 10px 18px;
}

.wgr-floating .wgr-switcher__trigger {
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    /* Optional: adjust for dark mode if theme supports it */
}

/* RTL Support */
[dir="rtl"] .wgr-switcher__arrow {
    margin-left: 0;
    margin-right: 4px;
}

[dir="rtl"] .wgr-switcher__check {
    margin-left: 0;
    margin-right: auto;
}
