/* FASTexa — بطاقات الرسائل (كل القشور ما عدا ويندوز الكلاسيكي) */

html:not([data-fx-shell="windows7"]) .fx-msg-toast-host {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 12120;
    width: min(420px, calc(100vw - 1.5rem));
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-height: calc(100vh - 28px);
    overflow: auto;
}

html:not([data-fx-shell="windows7"]) .fx-msg-toast-host:empty {
    display: none;
}

html[data-fx-shell="windows7"] .fx-msg-toast-host {
    display: none !important;
}

html:not([data-fx-shell="windows7"]) .fx-alert-toast,
html:not([data-fx-shell="windows7"]) .fx-remind-toast {
    display: none !important;
}

html:not([data-fx-shell="windows7"]) .alert[data-fx-toast-moved] {
    display: none !important;
}

.fx-msg-toast {
    pointer-events: auto;
    background: #fff;
    color: #111827;
    border-radius: 18px;
    box-shadow: 0 10px 32px rgba(15, 23, 42, 0.16), 0 1px 0 rgba(255, 255, 255, 0.7) inset;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: translateY(-12px);
    opacity: 0;
    transition: transform 0.28s ease, opacity 0.22s ease;
}

.fx-msg-toast.is-on {
    transform: translateY(0);
    opacity: 1;
}

.fx-msg-toast.is-out {
    transform: translateY(-8px);
    opacity: 0;
}

.fx-msg-toast__head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 14px 10px;
}

.fx-msg-toast__ico {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid currentColor;
    border-radius: 50%;
    position: relative;
    color: #22c55e;
}

.fx-msg-toast--success .fx-msg-toast__ico { color: #22c55e; }
.fx-msg-toast--danger .fx-msg-toast__ico { color: #ef4444; }
.fx-msg-toast--warning .fx-msg-toast__ico { color: #f59e0b; }
.fx-msg-toast--info .fx-msg-toast__ico { color: #3b82f6; }

.fx-msg-toast--success .fx-msg-toast__ico::after {
    content: '';
    position: absolute;
    inset-inline-start: 6px;
    top: 3px;
    width: 5px;
    height: 9px;
    border-inline-end: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
}

.fx-msg-toast--danger .fx-msg-toast__ico::before,
.fx-msg-toast--warning .fx-msg-toast__ico::before,
.fx-msg-toast--info .fx-msg-toast__ico::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 4px;
    width: 2px;
    height: 8px;
    margin-left: -1px;
    background: currentColor;
    border-radius: 2px;
}

.fx-msg-toast--danger .fx-msg-toast__ico::after,
.fx-msg-toast--warning .fx-msg-toast__ico::after,
.fx-msg-toast--info .fx-msg-toast__ico::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 3px;
    width: 2px;
    height: 2px;
    margin-left: -1px;
    background: currentColor;
    border-radius: 50%;
}

.fx-msg-toast--info .fx-msg-toast__ico::before {
    top: auto;
    bottom: 4px;
    height: 7px;
}

.fx-msg-toast--info .fx-msg-toast__ico::after {
    top: 4px;
    bottom: auto;
}

.fx-msg-toast__title {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 800;
    font-size: 0.98rem;
    line-height: 1.35;
    color: #111827;
}

.fx-msg-toast__tools {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline-start: auto;
}

.fx-msg-toast__btn {
    appearance: none;
    border: 0;
    background: transparent;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #9ca3af;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.fx-msg-toast__btn:hover,
.fx-msg-toast__btn:focus-visible {
    background: rgba(15, 23, 42, 0.06);
    color: #4b5563;
    outline: none;
}

.fx-msg-toast__chev::before {
    content: '';
    width: 7px;
    height: 7px;
    border-inline-end: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin-top: -3px;
}

.fx-msg-toast.is-open .fx-msg-toast__chev::before {
    transform: rotate(-135deg);
    margin-top: 3px;
}

.fx-msg-toast:not(.has-body) .fx-msg-toast__chev {
    display: none;
}

.fx-msg-toast__x::before,
.fx-msg-toast__x::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
}

.fx-msg-toast__x {
    position: relative;
}

.fx-msg-toast__x::before { transform: rotate(45deg); }
.fx-msg-toast__x::after { transform: rotate(-45deg); }

.fx-msg-toast__body {
    display: none;
    padding: 0 14px 8px 46px;
    color: #6b7280;
    font-size: 0.9rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

[dir="rtl"] .fx-msg-toast__body {
    padding: 0 46px 8px 14px;
}

.fx-msg-toast.is-open.has-body .fx-msg-toast__body {
    display: block;
}

.fx-msg-toast__action {
    display: none;
    margin: 4px 14px 12px 46px;
}

[dir="rtl"] .fx-msg-toast__action {
    margin: 4px 46px 12px 14px;
}

.fx-msg-toast.is-open .fx-msg-toast__action {
    display: inline-flex;
}

.fx-msg-toast__action-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.35rem 1.1rem;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    background: #fff;
    color: #111827;
    font-weight: 700;
    font-size: 0.92rem;
    text-decoration: none;
    cursor: pointer;
}

.fx-msg-toast__action-btn:hover {
    background: #f9fafb;
    color: #111827;
    text-decoration: none;
}

.fx-msg-toast__foot {
    position: relative;
    background: #eef1f4;
    color: #6b7280;
    font-size: 0.78rem;
    padding: 8px 14px 10px;
    cursor: pointer;
    user-select: none;
}

.fx-msg-toast__foot strong {
    color: #111827;
    font-weight: 800;
}

.fx-msg-toast__bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 4px;
    transform-origin: left center;
    animation: fxMsgToastBar linear forwards;
}

[dir="rtl"] .fx-msg-toast__bar {
    transform-origin: right center;
}

.fx-msg-toast--success .fx-msg-toast__bar { background: #22c55e; }
.fx-msg-toast--danger .fx-msg-toast__bar { background: #ef4444; }
.fx-msg-toast--warning .fx-msg-toast__bar { background: #f59e0b; }
.fx-msg-toast--info .fx-msg-toast__bar { background: #3b82f6; }

.fx-msg-toast.is-paused .fx-msg-toast__bar {
    animation-play-state: paused;
}

@keyframes fxMsgToastBar {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast {
    background: #15201c;
    color: #f3f6f4;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.42);
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__title {
    color: #f8fafc;
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__body {
    color: #c5d0cb;
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__btn {
    color: #94a3b8;
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__btn:hover,
html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__btn:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__action-btn {
    background: #1b2a26;
    border-color: #3f534c;
    color: #f8fafc;
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__action-btn:hover {
    background: #22332e;
    color: #fff;
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__foot {
    background: #0f1815;
    color: #9aa8a2;
}

html[data-fx-theme="dark"]:not([data-fx-shell="windows7"]) .fx-msg-toast__foot strong {
    color: #f8fafc;
}

@media print {
    .fx-msg-toast-host {
        display: none !important;
    }
}
