/* Toast Notification Component Styles */

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    pointer-events: none;
}

.toast {
    background: #10b981; /* Soft green */
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 0.75rem;
    transform: translateY(100%) translateX(0);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
    max-width: 350px;
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.4;
    border-left: 4px solid rgba(255, 255, 255, 0.3);
    position: relative; /* allow close button positioning */
    padding-right: 2.5rem; /* space for close button */
}

.toast.hidden {
    display: none;
}


.toast.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-left-color: #34d399;
}

.toast.error {
    background: #fee2e2; /* subtle red background */
    color: #7f1d1d;      /* dark red text */
    border-left-color: #ef4444; /* accent */
    max-width: 450px; /* Wider than default 350px for error messages */
}

.toast.info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-left-color: #60a5fa;
}

.toast.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-left-color: #fbbf24;
}

/* Toast entrance animation */
.toast.show {
    animation: popIn 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes popIn {
    0% {
        transform: translateY(100%) scale(0.8);
        opacity: 0;
    }
    50% {
        transform: translateY(-10%) scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

/* Toast exit animation */
.toast.hiding {
    animation: slideOutDown 0.3s ease-in-out forwards;
}

@keyframes slideOutDown {
    from {
        transform: translateY(0) translateX(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%) translateX(0);
        opacity: 0;
    }
}

/* Close button for toasts */
.toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.25rem;
    border-radius: 4px;
}

.toast-close:hover,
.toast-close:focus {
    opacity: 1;
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
