/* Global app styles and overrides */

/* Blazored.Toast RTL/LTR direction-aware overrides */
/* These rules respond to the document's dir attribute (ltr or rtl). */

/* Ensure toast containers adopt the document direction */
[dir="rtl"] .blazored-toast-container {
  direction: rtl;
}

/* Mirror container positions in RTL */
[dir="rtl"] .blazored-toast-container.top-right {
  right: auto;
  left: 0.75rem; /* 12px */
}

[dir="rtl"] .blazored-toast-container.bottom-right {
  right: auto;
  left: 0.75rem;
}

[dir="rtl"] .blazored-toast-container.top-left {
  left: auto;
  right: 0.75rem;
}

[dir="rtl"] .blazored-toast-container.bottom-left {
  left: auto;
  right: 0.75rem;
}

/* Align text and header/body in RTL */
[dir="rtl"] .blazored-toast {
  text-align: right;
}

[dir="rtl"] .blazored-toast .blazored-toast-header {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}

[dir="rtl"] .blazored-toast .blazored-toast-body {
  text-align: right;
}

/* Optional: if a progress bar is used via custom styling, make it fill RTL */
[dir="rtl"] .blazored-toast .blazored-toast-progress {
  transform-origin: right center;
}

/* LTR defaults (for clarity; typically already correct) */
[dir="ltr"] .blazored-toast-container {
  direction: ltr;
}
