/**
 * i18n chrome — language switcher + LTR layout overrides
 */

.erp-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.15rem;
    border-radius: 0.65rem;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
}

.erp-lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.3rem 0.45rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    text-decoration: none;
    line-height: 1.2;
}

.erp-lang-switcher__btn:hover {
    background: #eef2ff;
    color: #3730a3;
}

.erp-lang-switcher__btn.is-active {
    background: #1a7ff5;
    color: #fff;
}

/* English LTR — flip shell that assumes physical right */
html[dir="ltr"] #erp-sidebar {
    right: auto !important;
    left: 0 !important;
}

html[dir="ltr"] body.erp-shell--rail #erp-sidebar,
html[dir="ltr"] .erp-shell--rail #erp-sidebar {
    right: auto;
    left: 0;
}

html[dir="ltr"] .erp-sidebar-rail-hint {
    right: auto;
    left: 0;
}

html[dir="ltr"] body.sidebar-open #erp-sidebar,
html[dir="ltr"] #erp-sidebar.translate-x-0 {
    transform: translateX(0);
}

@media (max-width: 1023px) {
    html[dir="ltr"] #erp-sidebar {
        transform: translateX(-100%);
    }

    html[dir="ltr"] body.sidebar-open #erp-sidebar,
    html[dir="ltr"] #erp-sidebar.is-open {
        transform: translateX(0);
    }
}

html[dir="ltr"] body {
    text-align: left;
}

html[dir="ltr"] .erp-main-column {
    text-align: start;
}

html[dir="ltr"] .erp-lang-switcher {
    flex-direction: row;
}

html[dir="ltr"] body.erp-shell--app.erp-shell--rail #erp-sidebar {
    border-left: none !important;
    border-right: 1px solid #e8edf3 !important;
}

.erp-lang-switcher--hub {
    background: #fff;
    border-color: #ddd6fe;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
