/* بعد از MudBlazor — تراز فارسی برای هشدارها و پیام‌ها */

html[dir="rtl"] .mud-alert {
    direction: rtl !important;
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    width: 100%;
    box-sizing: border-box;
    gap: 8px;
}

/* Mud 8: flex:1 روی position باعث چپ‌چین شدن متن در باکس می‌شود */
html[dir="rtl"] .mud-alert .mud-alert-position {
    flex: 0 1 auto !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

html[dir="rtl"] .mud-alert .mud-alert-message,
html[dir="rtl"] .mud-alert .mud-alert-message-text,
html[dir="rtl"] .mud-alert .mud-alert-content,
html[dir="rtl"] .mud-alert .mud-typography,
html[dir="rtl"] .mud-alert .mud-typography-body1,
html[dir="rtl"] .mud-alert .mud-typography-body2 {
    flex: 0 1 auto !important;
    width: auto !important;
    max-width: 100%;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    text-align: center !important;
    justify-content: center !important;
}

html[dir="rtl"] .mud-alert .mud-alert-icon {
    align-self: center;
    flex: 0 0 auto;
    margin-right: 0 !important;
    margin-left: 0 !important;
    margin-inline-end: 8px !important;
    margin-inline-start: 0 !important;
}

html[dir="rtl"] .mud-table-no-records .mud-alert,
html[dir="rtl"] .mud-data-grid .mud-alert,
html[dir="rtl"] td .mud-alert,
html[dir="rtl"] .app-alert,
html[dir="rtl"] .index-news__alert .app-alert {
    width: 100%;
}

/* فقط پیام خطا / خالی در بخش اخبار — وسط باکس (نه کارت‌های خبر) */
html[dir="rtl"] .index-news__alert {
    display: flex;
    justify-content: center;
}

html[dir="rtl"] .index-news__alert .app-alert {
    justify-content: center !important;
    text-align: center !important;
}

/* متن‌های طولانی (سلب مسئولیت و …) — راست‌چین، نه چپ */
html[dir="rtl"] .mud-alert.stock-ai-disclaimer {
    justify-content: flex-start !important;
    text-align: right !important;
}

html[dir="rtl"] .mud-alert.stock-ai-disclaimer .mud-alert-message,
html[dir="rtl"] .mud-alert.stock-ai-disclaimer .mud-typography {
    text-align: right !important;
    width: 100% !important;
    flex: 1 1 auto !important;
}

html[dir="rtl"] .mud-grid-item {
    text-align: right;
}

html[dir="rtl"] .mud-snackbar-content-message,
html[dir="rtl"] .mud-dialog-content {
    text-align: right;
}
