/*------------------------------------------------------------------
    App Toast — stacking notifications (top-right)
-------------------------------------------------------------------*/
.app-toast-container {
    position: fixed;
    top: 20px;
    inset-inline-end: 20px;
    z-index: 10600;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 385px;
    max-width: calc(100vw - 32px);
    pointer-events: none;
}

.app-toast {
    --app-toast-color: #3b82f6;
    --app-toast-soft: #eaf2fe;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px 8px 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(16, 24, 40, 0.1), 0 1px 3px rgba(16, 24, 40, 0.06);
    pointer-events: auto;
    animation: app-toast-in 0.25s ease-out both;
}

.app-toast-success {
    --app-toast-color: #16a34a;
    --app-toast-soft: #e3f6ea;
}

.app-toast-error {
    --app-toast-color: #f43f5e;
    --app-toast-soft: #feebee;
}

.app-toast-warning {
    --app-toast-color: #f59e0b;
    --app-toast-soft: #fef4e2;
}

.app-toast-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: var(--app-toast-color);
    background: var(--app-toast-soft);
    border-radius: 6px;
}

.app-toast-icon svg {
    width: 18px;
    height: 18px;
}

.app-toast-body {
    flex: 1;
    min-width: 0;
}

.app-toast-title,
.app-toast-message {
    margin: 0;
    font-size: 13px;
    line-height: 18px;
    overflow-wrap: anywhere;
}

.app-toast-title {
    font-weight: 500;
    color: var(--app-toast-color);
}

.app-toast-message {
    color: #475467;
}

.app-toast-close {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    color: #667085;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.app-toast-close:hover {
    color: #101828;
    background: #f2f4f7;
}

.app-toast-close svg {
    width: 14px;
    height: 14px;
}

.app-toast-leave {
    animation: app-toast-out 0.2s ease-in both;
}

@keyframes app-toast-in {
    from {
        opacity: 0;
        transform: translateX(24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes app-toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(24px);
    }
}

[dir="rtl"] .app-toast {
    animation-name: app-toast-in-rtl;
}

[dir="rtl"] .app-toast-leave {
    animation-name: app-toast-out-rtl;
}

@keyframes app-toast-in-rtl {
    from {
        opacity: 0;
        transform: translateX(-24px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes app-toast-out-rtl {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-24px);
    }
}

@media (max-width: 576px) {
    .app-toast-container {
        top: 12px;
        inset-inline-end: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-toast,
    .app-toast-leave {
        animation-duration: 0.01ms;
    }
}
