#fluent-toast-region {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(340px, calc(100vw - 2rem));
    pointer-events: none;
}

#fluent-toast-region[data-position^="top"] {
    top: 1rem;
}

#fluent-toast-region[data-position^="bottom"] {
    bottom: 1rem;
    flex-direction: column-reverse;
}

#fluent-toast-region[data-position$="right"] {
    right: 1rem;
}

#fluent-toast-region[data-position$="left"] {
    left: 1rem;
}

#fluent-toast-region[data-position$="center"] {
    left: 50%;
    transform: translateX(-50%);
}

#fluent-toast-region fluent-message-bar {
    pointer-events: auto;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16), 0 2px 6px rgba(0, 0, 0, .08);
    animation: fluent-toast-in .22s cubic-bezier(.33, 0, .2, 1);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    min-height: 44px;
    padding-block: 10px;
    padding-inline: 14px;
    border-left-width: 4px;
}

#fluent-toast-region fluent-message-bar[intent="success"] {
    border-left-color: #0e700e;
}

#fluent-toast-region fluent-message-bar[intent="warning"] {
    border-left-color: #da3b01;
}

#fluent-toast-region fluent-message-bar[intent="error"] {
    border-left-color: #b10e1c;
}

#fluent-toast-region fluent-message-bar[intent="info"] {
    border-left-color: #0369a1;
}

#fluent-toast-region fluent-message-bar.fluent-toast-leaving {
    animation: fluent-toast-out .18s cubic-bezier(.33, 0, .2, 1) forwards;
}

#fluent-toast-region fluent-message-bar [slot="icon"] {
    display: flex;
    align-items: center;
}

#fluent-toast-region fluent-message-bar [slot="icon"] svg {
    display: block;
    width: 20px;
    height: 20px;
}

#fluent-toast-region fluent-message-bar [slot="dismiss"] svg {
    width: 16px;
    height: 16px;
}

@keyframes fluent-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes fluent-toast-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-8px) scale(.98);
    }
}

@media (prefers-reduced-motion: reduce) {
    #fluent-toast-region fluent-message-bar,
    #fluent-toast-region fluent-message-bar.fluent-toast-leaving {
        animation: none;
    }
}

@media (max-width: 480px) {
    #fluent-toast-region {
        left: 1rem !important;
        right: 1rem !important;
        width: auto;
        transform: none !important;
    }
}
