/**
 * Linno Translate — Flag-Only Language Switcher styles.
 *
 * ARIA Disclosure pattern: button toggles a dropdown list of flag links.
 * Minimal defaults — theme authors can override any rule.
 */

/* Container */
.linno-lang-switcher {
    position: absolute;
    display: inline-block;
    margin: 0;
    padding: 12px;
    right: 156px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    -moz-transform: translateY(-50%);
    -ms-transform: translateY(-50%);
    transform: translateY(-50%);
}

.linno-lang-switcher .linno-switcher-toggle {
    padding: 0 14px;
    width: 28px;
    border: none;
}

.linno-lang-switcher .linno-switcher-toggle:after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 0;
    width: 8px;
    height: 8px;
    border: none;
    margin: 0;
    background: url(data:image/svg+xml;base64,PHN2ZyBmaWxsPSJub25lIiB2aWV3Qm94PSIwIDAgOSA4IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGZpbGw9IiMyMDFDRkUiIGQ9Ik04LjYxNyA4aC04bDgtOHY4eiIvPjwvc3ZnPg==);
    background-repeat: no-repeat;
}

/* Toggle button */
.linno-switcher-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    line-height: 0;
}

/* Dropdown list */
.linno-switcher-list {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 9999;
    list-style: none;
    margin: 4px 0 0;
    padding: 4px 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    opacity: 1;
    transition: opacity 150ms ease-in-out;
    max-height: 50vh;
    overflow-y: auto;
}

.linno-switcher-list[hidden] {
    display: none;
}

/* Dropdown items */
.linno-switcher-list li {
    margin: 0;
    padding: 0;
}

.linno-switcher-list a {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    text-decoration: none;
    color: inherit;
    line-height: 0;
}

.linno-switcher-list a:hover,
.linno-switcher-list a:focus-visible {
    background: #f0f0f0;
    outline: none;
}

/* Flag images */
.linno-flag {
    display: block;
    width: 24px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
}

/* Text fallback for missing flag SVGs */
.linno-flag-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 18px;
    border-radius: 2px;
    background: #e0e0e0;
    font-size: 10px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    line-height: 1;
}
