/* ── alibiai RTL layout rules ── */
/* Loaded dynamically by i18n.js when lang='he' */

body.lang-he {
    direction: rtl;
    text-align: right;
}

/* Sidebar position, main-content margins, resizer position, collapse icon, and
   mobile-toggle position are all right-side by default in base CSS — no RTL
   overrides needed for those properties. */

/* ── Chat messages: flip alignment ── */
body.lang-he .chat-message.user      { align-self: flex-start; align-items: flex-start; }
body.lang-he .chat-message.assistant { align-self: flex-end;   align-items: flex-end; }

body.lang-he .msg-user {
    border-radius: 16px 16px 16px 4px !important;
}
body.lang-he .msg-assistant {
    border-radius: 16px 16px 4px 16px !important;
}

/* ── Case card: flip the left border ── */
body.lang-he .case-card {
    border-left: none !important;
    border-right: 4px solid #1a73e8;
}

/* ── Sub-nav items: adjust padding for RTL ── */
body.lang-he .sub-nav-item {
    padding: 8px 48px 8px 16px;
}

body.lang-he .case-nav-item {
    padding: 7px 44px 7px 12px;
}

/* ── Nav item icons: flip margin ── */
body.lang-he .nav-item i {
    margin-right: 0;
    margin-left: 12px;
}

body.lang-he .sub-nav-item i {
    margin-right: 0;
    margin-left: 8px;
}

body.lang-he .case-nav-item i {
    margin-right: 0;
    margin-left: 7px;
}

/* ── Controls bar: flip for RTL ── */
body.lang-he .controls-bar {
    flex-direction: row-reverse;
}

/* ── Detail header buttons: flip ── */
body.lang-he .detail-header .back-btn i {
    transform: scaleX(-1);
}

/* ── File item: flip layout ── */
body.lang-he .file-item .file-name,
body.lang-he .pfi-name {
    flex-direction: row-reverse;
}

/* ── Nav expand icon: move to logical start (left in RTL) and mirror direction ── */
body.lang-he .nav-item .expand-icon {
    margin-left: 0;
    margin-right: auto;
    transform: scaleX(-1);
}

body.lang-he .nav-item.expanded .expand-icon {
    transform: scaleX(-1) rotate(90deg);
}

/* ── Close button in modals ── */
body.lang-he .close-button {
    float: left;
}

/* ── Modal footer: flip ── */
body.lang-he .modal-footer {
    flex-direction: row-reverse;
}
