/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 40px;
    right: 40px; /* Align to bottom-right */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none; /* Prevent clicks from affecting underlying elements */
}

/* Toast */
.toast {
    position: relative;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: normal;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 16px 24px;
    border-radius: 5px;
    animation: fadeOut var(--timeout, 5s) forwards;
    overflow: hidden; /* Ensure the sheen stays within the boundaries */
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out; /* Smooth transitions */
    cursor: pointer; /* Indicate clickable toast */
    pointer-events: auto; /* Allow interaction with the toast */
}

/* Sheen Effect */
.toast::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 150%; /* Larger than the toast to cover the animation path */
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-30deg);
    animation: sheen var(--sheen-duration, 2s) infinite ease-in-out;
    pointer-events: none; /* Prevent interaction with the sheen */
}

/* Sheen Animation */
@keyframes sheen {
    0% {
        left: -150%;
    }
    50% {
        left: 50%;
    }
    100% {
        left: 150%;
    }
}

/* Fade Out Animation */
@keyframes fadeOut {
    0% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}
