/* MuLang language switcher (frontend) */

.mulang-switcher {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.mulang-switcher .lang-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1.2;
}

.mulang-switcher .lang-link:hover,
.mulang-switcher .lang-link:focus {
    text-decoration: none;
}

.mulang-switcher .lang-link.active {
    font-weight: 600;
}

.mulang-switcher .code {
    display: inline-flex;
    line-height: 1;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.mulang-switcher .name {
    text-decoration: none;
}

/* Language-filtered Page List block: highlight the page currently being viewed,
   matching the theme's existing .wp-block-navigation .current-menu-item treatment. */
.wp-block-page-list .current-menu-item > .wp-block-pages-list__item__link {
    color: var(--wp--preset--color--text-link);
}

/* Language switcher: dropdown variant */

.mulang-switcher--dropdown {
    position: relative;
    display: inline-block;
}

.mulang-switcher-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    margin: 0;
    padding: 0;
    font: inherit;
    color: inherit;
    line-height: 1.2;
    cursor: pointer;
}

.mulang-switcher-caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.mulang-switcher-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 6px;
    padding: 8px 12px;
    background: var(--wp--preset--color--background, #fff);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    min-width: max-content;
}

.mulang-switcher-menu[hidden] {
    display: none;
}

.mulang-switcher-menu .lang-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

.mulang-switcher-menu .lang-link:hover,
.mulang-switcher-menu .lang-link:focus {
    text-decoration: none;
}
