@keyframes slide-in-right {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out-right {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes slide-in-left {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slide-out-left {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

.animate-slide-in-right {
    animation: slide-in-right 0.3s ease-out;
}

.animate-slide-in-left {
    animation: slide-in-left 0.3s ease-out;
}

#toast-wrapper.toast-placement-wrapper {
    pointer-events: none;
    position: fixed !important;
    z-index: 9999 !important;
}

.toast-placement-top-right {
    top: 1rem !important;
    right: 1rem !important;
}

.toast-placement-top-left {
    top: 1rem !important;
    left: 1rem !important;
}

.toast-placement-bottom-right {
    bottom: 1rem !important;
    right: 1rem !important;
}

.toast-placement-bottom-left {
    bottom: 1rem !important;
    left: 1rem !important;
}

#toast-container {
    pointer-events: none;
}

#toast-container > * {
    pointer-events: auto;
}

#toast-container .alert {
    min-width: 300px;
    max-width: 400px;
}

#toast-close-all-container {
    pointer-events: auto;
    text-align: right;
    width: 100%;
    display: none;
}

/* Align close-all link for left placements */
.toast-placement-top-left #toast-close-all-container,
.toast-placement-bottom-left #toast-close-all-container {
    text-align: left;
}

#toast-close-all-link {
    text-decoration: underline;
    cursor: pointer;
}

.toast-pin-btn,
.toast-close-btn {
    background-color: transparent !important;
    border: none !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: 1rem !important;
    width: 1rem !important;
    line-height: 1 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
}

.toast-pin-btn:hover,
.toast-close-btn:hover {
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
}

.toast-pin-btn:active,
.toast-close-btn:active {
    background-color: transparent !important;
    border: none !important;
    outline: none !important;
}

.toast-pin-btn:focus,
.toast-close-btn:focus {
    outline: none !important;
}

.toast-badge-container {
    margin-top: 15px !important;
}

@media (max-width: 640px) {
    /* Override all placement settings: always bottom, full width with side spacing */
    #toast-wrapper.toast-placement-wrapper {
        top: auto !important;
        left: 0.5rem !important;
        right: 0.5rem !important;
        bottom: 1rem !important;
        width: auto !important;
        max-width: none !important;
    }

    #toast-container .alert {
        min-width: auto;
        max-width: 100%;
        touch-action: pan-y;
        user-select: none;
    }
}
