.speedy-popover {
    position: relative;
    overflow: visible;
    line-height: 30px;
}

.speedy-wrap {
    background-color: #fff;
    padding: 15px;
}

.speedy-wrap:after {
    content: "";
    display: table;
    clear: both;
}

@media (min-width: 381px) {
    .speedy-wrap {
        width: 380px;
    }

    .speedy-wrap > div {
        width: 50%;
        float: left;
    }
}

.speedy-popover ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.speedy-popover ul > li > a {
    display: block;
    text-decoration: none;
    padding: 0 3px;
    margin-bottom: 8px;
    color: inherit;
}

.speedy-popover ul > .active > a,
.speedy-popover ul > li > a:hover {
    color: #005e8d;
}

ul.speedy-inline {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: inline-block;
    line-height: 30px;
}

ul.speedy-inline > li {
    display: inline-block;
}

.speedy-inline > li > a span {
    padding: 3px 4px;
    border: 1px solid transparent;
}

.speedy-inline > li > a {
    display: block;
    text-decoration: none;
    padding: 0;
    margin: 0 4px 4px 0;
}

.mod_speedylanguages ul > .active > a span,
.mod_speedylanguages ul > li > a:hover span,
.mod_speedylanguages ul > li > .disabled span {
    opacity: .6;
}

.speedy-dropdown.backend {
    margin-bottom: 0;
    margin-top: 1px;
}

/* In Atum's header the item shrinks to its min-content width, where the select's
   width: 100% and max-inline-size: 100% count as nothing: size it by its options,
   and match the other header items */
.header-item .speedy-dropdown.backend {
    inline-size: auto;
    max-inline-size: none;
    padding-block: .5rem;
    padding-inline-start: .75rem;
    font-size: .75rem;
    border-radius: var(--header-item-content-border-radius);
}

div[id^="speedy"] {
    margin-bottom: 0;
    margin-top: 1px;
}

/* Administrator, pop-over layout: a drop-down of Atum's header, as its User Menu. The flag sits in
   the header's round icon, inside the span Atum colours (in dark mode, its background shorthand
   would clear a flag's image) */
.speedy-module-speedylanguages .speedy-flag {
    display: block;
    inline-size: 20px;
    min-inline-size: 20px;
    block-size: 20px;
    margin: 0;
    border-radius: 50%;
    background-size: cover;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .4);
}

.speedy-module-speedylanguages .dropdown-item .flag-icon {
    margin-inline-end: .5rem;
}

/* Pop-over layout: a <details> element whose list opens below the active language */
details.speedy-popover {
    display: inline-block;
}

details.speedy-popover > summary {
    cursor: pointer;
    list-style: none;
}

details.speedy-popover > summary::-webkit-details-marker {
    display: none;
}

details.speedy-popover > .speedy-wrap {
    position: absolute;
    z-index: 1000;
    top: 100%;
    inset-inline-start: 0;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
}

/* Flags: the rule of each language's flag is added with the switcher (SpeedylanguagesHelper::flagStyles()) */
.flag-icon {
    background-size: contain;
    background-position: 50%;
    background-repeat: no-repeat;
    position: relative;
    display: inline-block;
    width: 1.33333333em;
    line-height: 1em;
}

.flag-icon:before {
    content: "\00a0";
}

.flag-icon.flag-icon-squared {
    width: 1em;
}
