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

#toast-container > *, .toast-container > * {
    pointer-events: auto; /* Re-enable clicks on toasts */
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 20px;
    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: center;
    gap: 12px;
    min-width: 320px;
    max-width: 400px;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy effect */
    border-left: 4px solid #ccc;
    position: relative;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.toast.show {
    transform: translateX(0);
}

/* Progress Bar Styles */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(0,0,0,0.05);
}

.toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    animation: progress-decrease linear forwards;
    border-radius: 0 2px 2px 0;
}

.toast-success { border-left-color: var(--success); }
.toast-success .toast-progress-bar { background: var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-success .toast-message { color: var(--success); } /* As per user request */

.toast-error { border-left-color: var(--danger); }
.toast-error .toast-progress-bar { background: var(--danger); }
.toast-error .toast-icon { color: var(--danger); }
.toast-error .toast-message { color: var(--danger); }

.toast-info { border-left-color: var(--info); }
.toast-info .toast-progress-bar { background: var(--info); }
.toast-info .toast-icon { color: var(--info); }
.toast-info .toast-message { color: var(--info); }

.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-progress-bar { background: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-warning .toast-message { color: var(--warning); }


@keyframes progress-decrease {
    from { width: 100%; }
    to { width: 0%; }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateX(0) scale(1); }
    to { opacity: 0; transform: translateX(120%) scale(0.95); }
}

.toast-message {
    font-weight: 500;
    font-size: 0.95rem;
    flex: 1;
    line-height: 1.4;
}

.toast-icon {
    font-size: 1.25rem;
}

.toast-close {
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-main) !important;
}
