/* Labamu Region Switcher v1.12.0 */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&display=swap');

.lbm-switcher {
    position: relative;
    display: inline-block;
    font-family: 'Lato', sans-serif;
    max-width: 100%;
}

/* Trigger button */
.lbm-switcher .lbm-trigger,
.lbm-switcher .lbm-trigger:visited {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid #E9E9E9 !important;
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    color: #111827 !important;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    white-space: nowrap;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    line-height: 1;
    min-width: 160px;
    max-width: 100%;
    box-sizing: border-box;
    box-shadow: none !important;
    text-decoration: none !important;
}

.lbm-switcher .lbm-trigger:hover {
    border-color: #1D6AFF !important;
    background: #d4e5ff !important;
    background-color: #d4e5ff !important;
    box-shadow: 0 0 0 3px rgba(29, 106, 255, 0.12) !important;
}

.lbm-switcher .lbm-trigger:focus-visible {
    outline: 2px solid #1D6AFF;
    outline-offset: 2px;
}

.lbm-flag {
    border-radius: 3px;
    border: 1px solid #E9E9E9 !important;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.lbm-trigger-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.lbm-trigger-region {
    font-size: 15px;
    font-weight: 600;
    color: #111827 !important;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.lbm-trigger-lang {
    font-size: 12px;
    color: #6b7280 !important;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.lbm-chevron {
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    display: block;
}

.lbm-switcher.is-open .lbm-chevron {
    transform: rotate(180deg);
}

/* Dropdown — positioned via JS (fixed, appended to body to escape overflow:hidden) */
.lbm-dropdown {
    display: none;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    box-sizing: border-box;
    font-family: 'Lato', sans-serif;
}

.lbm-group-label {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 4px 10px 3px;
    margin: 0;
    line-height: 1.4;
}

.lbm-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 5px 2px;
}

.lbm-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #111827;
    margin-bottom: 2px;
    transition: background 0.12s ease;
    cursor: pointer;
}

.lbm-option:last-child {
    margin-bottom: 0;
}

.lbm-option:hover {
    background: #E6F0FF;
    text-decoration: none;
    color: #111827;
}

.lbm-option:focus-visible {
    outline: 2px solid #1D6AFF;
    outline-offset: -2px;
}

.lbm-option.is-active {
    background: #f3f4f6;
}

.lbm-option-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.lbm-option-region {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #111827;
    line-height: 1.2;
}

.lbm-option-lang {
    display: block;
    font-size: 11px;
    color: #6b7280;
    line-height: 1.2;
}

.lbm-check {
    margin-left: auto;
    color: #1D6AFF;
    flex-shrink: 0;
    display: block;
}

/* ─── Mobile ─────────────────────────────────────────────── */
@media (max-width: 480px) {
    .lbm-switcher .lbm-trigger,
    .lbm-switcher .lbm-trigger:visited {
        padding: 8px 12px;
        gap: 8px;
        min-width: 0;
        border-radius: 12px;
    }

    .lbm-trigger-region {
        font-size: 13px;
    }

    .lbm-trigger-lang {
        font-size: 11px;
    }

    .lbm-dropdown {
        min-width: 200px;
    }
}
