.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.language-dropdown {
    position: relative;
    flex: none;
}

.lang-pill {
    display: inline-flex;
    height: 2.5rem;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    background: rgba(5, 8, 10, 0.88);
    padding: 0.45rem 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: border-color 160ms ease, background-color 160ms ease;
}

.lang-pill:hover,
.lang-pill[aria-expanded="true"] {
    border-color: #10b981;
    background: #05080a;
}

.lang-pill:focus-visible {
    outline: 3px solid rgba(16, 185, 129, 0.35);
    outline-offset: 2px;
}

.flag {
    display: block;
    width: 1.5rem;
    height: 1rem;
    flex: none;
    border-radius: 0.1875rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}

.lang-chevron {
    width: 0.875rem;
    height: 0.875rem;
    transition: transform 160ms ease;
}

.lang-pill[aria-expanded="true"] .lang-chevron {
    transform: rotate(180deg);
}

.lang-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 1000;
    min-width: 9rem;
    margin: 0;
    padding: 0.375rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0.875rem;
    background: rgba(5, 8, 10, 0.96);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    pointer-events: none;
    transition: opacity 160ms ease, visibility 160ms ease, transform 160ms ease;
}

.lang-menu--open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.lang-menu a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border-radius: 0.625rem;
    padding: 0.625rem 0.75rem;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.lang-menu a:hover,
.lang-menu a[aria-current="true"] {
    background: rgba(16, 185, 129, 0.16);
    color: #6ee7b7;
}

@media (max-width: 1023px) {
    .lang-current-text,
    .lang-chevron {
        display: none;
    }

    .lang-pill {
        width: 2.5rem;
        justify-content: center;
        padding-inline: 0.45rem;
    }
}
