/* Language switcher */
.lang-switcher {
    position: relative;
    flex: 0 0 auto;
    min-width: auto;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 16px;
    background: white;
    color: #333;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1em;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
    height: 100%;
}

.lang-toggle:hover {
    transform: translateY(-2px);
}

.lang-toggle-code {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-toggle-arrow {
    font-size: 0.8em;
    transition: transform 0.2s ease;
}

.lang-switcher.open .lang-toggle-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
    z-index: 2000;
    overflow: hidden;
    display: none;
}

.lang-switcher.open .lang-dropdown {
    display: block;
}

.lang-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid #eee;
    color: #888;
}

.lang-search {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95em;
    color: #333;
    background: transparent;
}

.lang-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    max-height: 340px;
    overflow-y: auto;
}

.lang-list li {
    margin: 0;
}

.lang-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.95em;
    color: #333;
    transition: background 0.15s ease;
}

.lang-option:hover {
    background: #f2f4f8;
}

.lang-option.active {
    background: #eef3ff;
    font-weight: 700;
}

.lang-option-native {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-option-name {
    color: #999;
    font-size: 0.85em;
    white-space: nowrap;
}

.lang-soon {
    display: inline-block;
    background: #ff9800;
    color: white;
    font-size: 0.65em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1;
}

.lang-soon::before {
    content: "soon";
}

.lang-option-hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .lang-switcher {
        min-width: 100%;
    }

    .lang-toggle {
        width: 100%;
        justify-content: center;
    }

    .lang-dropdown {
        right: 50%;
        transform: translateX(50%);
        width: 320px;
    }
}

/* Styling when inside .footer-menu */
.footer-menu .lang-switcher {
    margin-left: 4px;
}

.footer-menu .lang-toggle {
    padding: 6px 12px;
    font-size: 0.9em;
    box-shadow: none;
    border: 1px solid #ddd;
    background: #f8f9fa;
}

.footer-menu .lang-toggle:hover {
    background: #f0f0f0;
    transform: none;
}

.footer-menu .lang-dropdown {
    top: auto;
    bottom: calc(100% + 8px);
}
