/* toast.css */

#toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none; /* Let clicks pass through empty space */
}

.toast {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: flex-start;
    padding: 16px;
    width: 320px;
    max-width: calc(100vw - 48px);
    position: relative;
    overflow: hidden;
    pointer-events: auto; /* Re-enable clicks on the toast itself */
    animation: toastSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    border: 1px solid #F1F5F9;
}

.toast-hiding {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast-icon {
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-content {
    flex-grow: 1;
    margin-right: 8px;
    padding-top: 2px;
}

.toast-message {
    margin: 0;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1E293B;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    color: #94A3B8;
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
    flex-shrink: 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #475569;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    animation-name: toastProgress;
    animation-timing-function: linear;
    animation-fill-mode: forwards;
    transform-origin: left;
}

/* Animations */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

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