@charset "UTF-8";

/* APG Multisite Suite: language switcher. Minimal on purpose, so it takes the theme styles. */

/* Icon fonts made with IcoMoon and the prefix "apg-" (an Avada custom icon set, for example) give
   every class that starts with apg- their icon font with !important, and text turns into missing
   glyphs. The classes of the plugin keep the font of the page around them. */
:root [class^="apg-multisite"],
:root [class*=" apg-multisite"] {
    font-family: inherit !important;
}
.apg-multisite-switcher__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.apg-multisite-switcher__link,
.apg-multisite-switcher__current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

/* Native name, name in the current language and code, side by side also inside theme menus. */
.apg-multisite-switcher__translated,
.apg-multisite-switcher__code {
    margin-left: 0.3em;
}

/* The links of the switcher already space them out. */
.apg-multisite-switcher__link > span,
.apg-multisite-switcher__current > span {
    margin-left: 0;
}

.apg-multisite-switcher__flag,
.apg-multisite-menu-item img {
    width: 20px;
    height: 15px;
    object-fit: cover;
    vertical-align: middle;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.apg-multisite-menu-item > a img.apg-multisite-switcher__flag {
    display: inline-block;
    margin: 0 6px 0 0;
}

/* List and flags. */
.apg-multisite-switcher--list .apg-multisite-switcher__list,
.apg-multisite-switcher--flags .apg-multisite-switcher__list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
}

.apg-multisite-switcher__item.is-current .apg-multisite-switcher__link {
    font-weight: 600;
}

.apg-multisite-switcher__link.is-missing {
    opacity: 0.7;
}

/* Dropdown. */
.apg-multisite-switcher--dropdown {
    position: relative;
    display: inline-block;
}

.apg-multisite-switcher__current {
    cursor: pointer;
    list-style: none;
}

.apg-multisite-switcher__current::-webkit-details-marker {
    display: none;
}

.apg-multisite-switcher__current::after {
    content: "";
    width: 0.4em;
    height: 0.4em;
    margin-left: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
}

.apg-multisite-switcher--dropdown .apg-multisite-switcher__list {
    position: absolute;
    z-index: 100;
    top: 100%;
    left: 0;
    min-width: 100%;
    padding: 6px 0;
    /* Outside a menu there is no submenu of the theme to copy: the base colour of a block theme,
       or the page colour of the browser. A colour chosen in the settings wins. */
    background-color: var(--wp--preset--color--base, Canvas);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.apg-multisite-switcher--dropdown .apg-multisite-switcher__link {
    padding: 4px 12px;
    white-space: nowrap;
}
