.lslc-switcher.smp-language-switcher {
    box-sizing: border-box;
    width: auto;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    font-family: inherit;
    position: relative;
    z-index: 10020;
}

.smp-language-switcher .lslc-switcher__label {
    font-size: 13px;
    font-weight: 700;
    color: inherit;
}

.smp-language-switcher .lslc-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.smp-language-switcher .lslc-dropdown__summary {
    box-sizing: border-box;
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 96px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(45, 45, 45, 0.18);
    border-radius: 8px;
    background: #fff;
    color: #2d2d2d;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    user-select: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.smp-language-switcher .lslc-dropdown__summary::-webkit-details-marker {
    display: none;
}

.smp-language-switcher .lslc-dropdown__summary:hover,
.smp-language-switcher .lslc-dropdown[open] .lslc-dropdown__summary {
    border-color: rgba(45, 45, 45, 0.38);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
}

.smp-language-switcher .lslc-dropdown__current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2d2d2d;
}

.smp-language-switcher .lslc-dropdown__chevron {
    color: #2d2d2d;
    font-size: 10px;
    line-height: 1;
    transform: translateY(1px);
}

.smp-language-switcher .lslc-dropdown__menu {
    box-sizing: border-box;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 142px;
    padding: 6px;
    border: 1px solid rgba(45, 45, 45, 0.14);
    border-radius: 8px;
    background: #fff;
    color: #2d2d2d;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
    z-index: 9999;
}

.smp-language-switcher .lslc-dropdown__option {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 9px 10px;
    border-radius: 6px;
    background: #fff;
    color: #2d2d2d;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
}

.smp-language-switcher .lslc-dropdown__option:hover {
    background: #f3f4f6;
    color: #2d2d2d;
    text-decoration: none;
}

.smp-language-switcher .lslc-dropdown__option.is-active {
    background: #2d2d2d;
    color: #fff;
}

.smp-language-switcher .lslc-dropdown__name {
    color: inherit;
}

.smp-language-switcher--inline .lslc-inline__items {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.smp-language-switcher--inline .lslc-inline__option {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 32px;
    min-height: 32px;
    padding: 3px 6px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #2d2d2d;
    text-decoration: none;
}

.smp-language-switcher--inline .lslc-inline__option:hover,
.smp-language-switcher--inline .lslc-inline__option.is-active {
    border-color: rgba(45, 45, 45, 0.28);
}

.smp-language-switcher .lslc-flag-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.smp-language-switcher .lslc-flag {
    display: block;
    width: auto;
    height: 22px;
    max-width: 30px;
    object-fit: contain;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.smp-language-switcher .lslc-flag-emoji {
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 640px) {
    .lslc-switcher.smp-language-switcher {
        padding: 0;
        flex-wrap: nowrap;
    }

    .smp-language-switcher .lslc-dropdown__summary {
        min-width: 92px;
        height: 34px;
        padding: 0 10px;
        font-size: 12px;
    }

    .smp-language-switcher .lslc-dropdown__menu {
        left: 50%;
        right: auto;
        min-width: 136px;
        transform: translateX(-50%);
    }

    .smp-language-switcher .lslc-dropdown__option {
        padding: 9px 10px;
        font-size: 12px;
    }

    .smp-language-switcher--inline .lslc-inline__option {
        width: 38px;
        height: 30px;
        min-height: 30px;
        padding: 3px 5px;
    }

    .smp-language-switcher .lslc-flag {
        height: 20px;
        max-width: 28px;
    }

    .smp-language-switcher .lslc-flag-emoji {
        font-size: 18px;
    }
}

/* SIXSETS_HOMEPAGE_LANGUAGE_SHELL_FINAL_V2
 *
 * The two WordPress spacer blocks before .smp-home are removed.
 * The plugin then owns one 113px high #f5f6f8 language shell.
 *
 * Screenshot measured geometry:
 * old gray area: 61px
 * old white language row: 52px
 * merged total: 113px
 */

/* The homepage WordPress page currently places two spacer blocks
 * immediately before the plugin homepage. They created the former
 * upper gray strip. Once the plugin owns the merged language shell,
 * those spacers must not consume layout height.
 */
body.home .front-page-content--full .entry-content
> .wp-block-spacer:has(~ .smp-home) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* One real plugin-owned visual container. */
.smp-home .smp-home-language-shell {
    box-sizing: border-box;

    width: 100%;
    max-width: none;

    height: 113px;
    min-height: 113px;

    margin: 0;
    padding: 0 16px;

    background: #f5f6f8 !important;

    border: 0;
    border-radius: 0;
    box-shadow: none;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: visible;
    position: relative;
    z-index: 20;
}

/* The nav itself is no longer a separate white container. */
.smp-home .smp-home-language-shell
> .smp-home-language-row {
    box-sizing: border-box;

    width: auto;
    max-width: none;

    height: auto;
    min-height: 0;

    margin: 0;
    padding: 0;

    background: transparent !important;

    border: 0 !important;
    border-radius: 0;
    box-shadow: none !important;

    display: flex;
    align-items: center;
    justify-content: center;

    position: static;
}

/* Entire flag group centered inside the 113px shell. */
.smp-home .smp-home-language-shell
.lslc-inline__items {
    display: flex;
    align-items: center;
    justify-content: center;

    flex-wrap: nowrap;
    gap: 10px;

    width: auto;
    height: auto;

    margin: 0;
    padding: 0;
}

/* Each language button. */
.smp-home .smp-home-language-shell
.lslc-inline__option {
    box-sizing: border-box;

    width: 42px;
    height: 32px;
    min-width: 42px;
    min-height: 32px;

    margin: 0;
    padding: 4px 6px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    background: transparent !important;

    border: 1px solid transparent;
    border-radius: 8px;

    box-shadow: none;
    text-decoration: none;
    line-height: 1;
}

/* Hover remains subtle. */
.smp-home .smp-home-language-shell
.lslc-inline__option:hover {
    border-color: rgba(45,45,45,.18);
    background: transparent !important;
}

/* Selected language keeps the border. */
.smp-home .smp-home-language-shell
.lslc-inline__option.is-active,
.smp-home .smp-home-language-shell
.lslc-inline__option[aria-current="true"] {
    border-color: rgba(45,45,45,.32);
    background: rgba(255,255,255,.38) !important;
}

/* Fixed flag slot. */
.smp-home .smp-home-language-shell
.lslc-flag-wrap--local {
    width: 30px;
    height: 22px;
    min-width: 30px;
    min-height: 22px;

    flex: 0 0 30px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    margin: 0;
    padding: 0;

    overflow: hidden;
    line-height: 1;
}

/* CSS/SVG flag itself is centered in that slot. */
.smp-home .smp-home-language-shell
.lslc-local-flag {
    display: block;

    width: 30px;
    height: 22px;
    min-width: 30px;
    min-height: 22px;

    margin: 0;
    padding: 0;

    box-sizing: border-box;
    border: 0;
    border-radius: 2px;
    box-shadow: inset 0 0 0 1px rgba(45, 45, 45, 0.20);

    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: 100% 100% !important;
}

/* Flags only. No visible fallback text. */
.smp-home .smp-home-language-shell
.lslc-flag-native,
.smp-home .smp-home-language-shell
.screen-reader-text,
.smp-home .smp-home-language-shell
.lslc-network-flag {
    display: none !important;
}

@media (max-width: 640px) {

    .smp-home .smp-home-language-shell {
        padding-left: 10px;
        padding-right: 10px;
    }

    .smp-home .smp-home-language-shell
    .lslc-inline__items {
        gap: 8px;
    }

    .smp-home .smp-home-language-shell
    .lslc-inline__option {
        width: 38px;
        height: 30px;
        min-width: 38px;
        min-height: 30px;

        padding: 4px 5px;
    }

    .smp-home .smp-home-language-shell
    .lslc-flag-wrap--local,
    .smp-home .smp-home-language-shell
    .lslc-local-flag {
        width: 28px;
        height: 20px;
        min-width: 28px;
        min-height: 20px;
    }
}


/* SIXSETS_HOMEPAGE_FLAG_CONTAINER_BG_FINAL */
.smp-home .smp-home-language-shell,
.smp-home .smp-home-language-row {
    background: #f5f6f8 !important;
}
