.pma-localise-switcher {
    position: fixed;
    right: max(1.25rem, env(safe-area-inset-right));
    bottom: max(1.25rem, env(safe-area-inset-bottom));
    z-index: 99990;
    box-sizing: border-box;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #171717;
    direction: ltr;
    font: inherit;
    line-height: 1.25;
}

.pma-localise-switcher *,
.pma-localise-switcher *::before,
.pma-localise-switcher *::after {
    box-sizing: border-box;
}

.pma-localise-switcher__toggle {
    display: grid;
    width: 3.25rem;
    height: 3.25rem;
    margin: 0;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #171717;
    box-shadow: 0 0.35rem 1.35rem rgba(0, 0, 0, 0.2);
    cursor: pointer;
    font: inherit;
    touch-action: manipulation;
    transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
    -webkit-tap-highlight-color: transparent;
}

.pma-localise-switcher__toggle:hover,
.pma-localise-switcher__toggle[aria-expanded="true"] {
    background: #f7f7f7;
    box-shadow: 0 0.45rem 1.6rem rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.pma-localise-switcher__toggle:focus-visible,
.pma-localise-switcher a:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

.pma-localise-switcher__current-flag {
    display: block;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 1.75rem;
    line-height: 1;
}

.pma-localise-switcher__menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    min-width: 11.5rem;
    padding: 0.45rem;
    border: 0;
    border-radius: 1.35rem;
    background: #fff;
    box-shadow: 0 0.55rem 2rem rgba(0, 0, 0, 0.2);
    color: #171717;
    transform-origin: right bottom;
}

.pma-localise-switcher__menu[hidden] {
    display: none;
}

.pma-localise-switcher__suggestion {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.75rem);
    display: flex;
    min-width: max-content;
    padding: 0.35rem;
    align-items: center;
    gap: 0.15rem;
    border: 0;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 0.55rem 2rem rgba(0, 0, 0, 0.2);
    color: #171717;
}

.pma-localise-switcher__suggestion[hidden] {
    display: none;
}

.pma-localise-switcher__suggestion a,
.pma-localise-switcher__suggestion button {
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.25;
}

.pma-localise-switcher__suggestion a {
    padding: 0.45rem 0.55rem 0.45rem 0.7rem;
    border-radius: 999px;
    text-decoration: none;
    white-space: nowrap;
}

.pma-localise-switcher__suggestion button {
    display: grid;
    width: 2rem;
    height: 2rem;
    padding: 0;
    place-items: center;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
}

.pma-localise-switcher__suggestion a:hover,
.pma-localise-switcher__suggestion button:hover {
    background: #f1f1f1;
}

.pma-localise-switcher .pma-localise-switcher__menu ul {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.pma-localise-switcher .pma-localise-switcher__menu li {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    background-image: none !important;
}

.pma-localise-switcher .pma-localise-switcher__menu li::marker {
    content: "" !important;
    font-size: 0 !important;
}

.pma-localise-switcher .pma-localise-switcher__menu li::before,
.pma-localise-switcher .pma-localise-switcher__menu li::after {
    display: none !important;
    content: none !important;
}

.pma-localise-switcher[data-position="left"] { right: auto !important; left: max(1.25rem, env(safe-area-inset-left)); }
.pma-localise-switcher[data-position="left"] .pma-localise-switcher__menu,
.pma-localise-switcher[data-position="left"] .pma-localise-switcher__suggestion { right: auto; left: 0; }
.pma-localise-switcher__menu { max-width: calc(100vw - 2.5rem); max-height: min(70vh, 32rem); overflow-y: auto; }
.pma-localise-switcher__suggestion button { min-width: 2.75rem; min-height: 2.75rem; }

.pma-localise-switcher__menu a {
    display: flex;
    min-height: 2.75rem;
    padding: 0.55rem 0.75rem;
    align-items: center;
    gap: 0.65rem;
    border: 0;
    border-radius: 0.95rem;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.25;
    text-decoration: none;
    touch-action: manipulation;
    transition: background-color 160ms ease;
    -webkit-tap-highlight-color: transparent;
}

.pma-localise-switcher__menu a:hover,
.pma-localise-switcher__menu a[aria-current="page"] {
    background: #f1f1f1;
}

.pma-localise-switcher__menu a[aria-current="page"] {
    font-weight: 600;
}

.pma-localise-switcher__flag {
    flex: 0 0 auto;
    width: 1.7rem;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    font-size: 1.35rem;
    line-height: 1;
    text-align: center;
}

.pma-localise-switcher__label {
    min-width: 0;
    overflow-wrap: anywhere;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .pma-localise-switcher {
        right: max(1rem, env(safe-area-inset-right));
        bottom: max(1rem, env(safe-area-inset-bottom));
    }

    .pma-localise-switcher__suggestion {
        max-width: calc(100vw - 2rem);
    }
}

@media (min-width: 601px) {
    /* Salient places its WooCommerce share control in the same fixed corner. */
    .wp-theme-salient.single-product .pma-localise-switcher {
        right: max(5.25rem, env(safe-area-inset-right));
    }
}

@media (prefers-reduced-motion: reduce) {
    .pma-localise-switcher__toggle,
    .pma-localise-switcher__menu a {
        transition: none;
    }
}
