/* OSU Polylang Multisite Language Switcher — inline dropdown styles */

.osu-pmls {
    position: relative;
    display: inline-block;
    width: auto;
    font: inherit;
    line-height: 1.4;
    color: #000;
}

.osu-pmls  button:focus {
    background:#000;
}

.osu-pmls *,
.osu-pmls *::before,
.osu-pmls *::after {
    box-sizing: border-box;
}

/* ---------- Trigger ---------- */

.osu-pmls-dd-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    padding: 3px 6px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 0;
    color: inherit;
    font: inherit;
    line-height: 1.5;
    text-align: left;
    cursor: pointer;
}

.osu-pmls-dd-trigger:hover {
    background: #f5f5f5;
    color: inherit;
}

.osu-pmls-dd-trigger:focus,
.osu-pmls-dd-trigger:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.osu-pmls-dd-current {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
}

.osu-pmls-dd-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
}

.osu-pmls-caret {
    display: inline-flex;
    align-items: center;
    color: inherit;
    transition: transform 0.15s ease;
}

.osu-pmls-dd-trigger[aria-expanded="true"] .osu-pmls-caret {
    transform: rotate(180deg);
}

/* When open, drop the seam between trigger and list. */
.osu-pmls-dd-trigger[aria-expanded="true"] {
    border-bottom-color: transparent;
}

/* ---------- Flags ---------- */

.osu-pmls-flag,
img.osu-pmls-flag {
    display: inline-block;
    width: 16px;
    height: 11px;
    object-fit: cover;
    vertical-align: middle;
    border: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
    flex: 0 0 auto;
}

.osu-pmls-flag--text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    min-width: 1.4em;
    padding: 0 4px;
    font-size: 1em;
    font-weight: 600;
    line-height: 1;
    box-shadow: none;
    background: none;
}

/* ---------- List ---------- */

.osu-pmls-dd-list {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    margin: 0;
    padding: 0;
    min-width: 100%;
    width: max-content;
    list-style: none;
    background: #fff;
    border: 1px solid #000;
    color: #000;
}

.osu-pmls-dd-list[hidden] {
    display: none;
}

.osu-pmls-dd-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    cursor: pointer;
    white-space: nowrap;
}

.osu-pmls-dd-item:hover,
.osu-pmls-dd-item:focus,
.osu-pmls-dd-item:focus-visible {
    background: #f0f0f0;
    color: inherit;
    outline: none;
}

.osu-pmls-dd-item.is-active {
    background: #000;
    color: #fff;
}

.osu-pmls-dd-item.is-active:hover,
.osu-pmls-dd-item.is-active:focus,
.osu-pmls-dd-item.is-active:focus-visible {
    background: #000;
    color: #fff;
}

.osu-pmls-dd-sub {
    margin-left: auto;
    padding-left: 12px;
    font-size: 0.85em;
    opacity: 0.7;
}
