.language-picker {
    position: relative;
    color: #fff;
    font-family: Arial, sans-serif;
    line-height: 1.4;
    z-index: 20;
}

.language-picker[hidden] {
    display: none;
}

.language-picker summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 12px 18px;
    border: 1px solid #103260;
    border-radius: 2px;
    background: rgba(6, 26, 63, 0.85);
    font-size: 13px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.language-picker summary::-webkit-details-marker {
    display: none;
}

.language-picker summary:hover,
.language-picker[open] summary {
    background: #0056b3;
    border-color: #007bff;
}

.language-picker summary:focus-visible,
.language-picker select:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.language-picker__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 250px;
    max-width: calc(100vw - 32px);
    padding: 18px;
    border: 1px solid #103260;
    border-radius: 4px;
    background: #0b1d33;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    text-align: left;
}

.language-picker label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
}

.language-picker select {
    width: 100%;
    min-height: 44px;
    padding: 10px;
    border: 1px solid #54718e;
    border-radius: 4px;
    background: #061a3f;
    color: #fff;
    color-scheme: dark;
    font-size: 16px;
    cursor: pointer;
}

.language-picker p {
    margin-top: 10px;
    color: #cbd5e1;
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 0;
}

.has-sitewide-language {
    padding-bottom: 100px;
}

.language-picker--sitewide {
    position: fixed;
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
}

.language-picker--sitewide .language-picker__panel {
    top: auto;
    bottom: calc(100% + 8px);
}

@media (max-width: 768px) {
    .language-picker {
        flex-basis: 100%;
    }

    .language-picker__panel {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .language-picker--sitewide .language-picker__panel {
        left: auto;
        right: 0;
        transform: none;
    }
}
