/* Modern Toast Notification Styles */
.toast-container {
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    z-index: 99999 !important;
    width: 350px !important;
    bottom: auto !important;
    left: auto !important;
}

.toast-notification {
    position: relative !important;
    background: #fff !important;
    border-radius: 8px !important;
    padding: 16px 20px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px !important;
    opacity: 0 !important;
    transform: translateX(400px) !important;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) !important;
    border-left: 4px solid !important;
    overflow: hidden !important;
    font-family: inherit !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #333 !important;
}

.toast-notification.show {
    opacity: 1 !important;
    transform: translateX(0) !important;
}

.toast-notification.hide {
    opacity: 0 !important;
    transform: translateX(400px) !important;
}

.toast-notification::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: currentColor;
    opacity: 0.3;
    animation: progress 10s linear forwards; /* Updated to 10s to match default duration */
}

@keyframes progress {
    to {
        width: 0;
    }
}

.toast-notification.no-progress::before {
    display: none;
}

/* Toast Types */
.toast-notification.success {
    border-left-color: #28a745 !important;
}

.toast-notification.success .toast-icon {
    color: #28a745 !important;
}

.toast-notification.error {
    border-left-color: #dc3545 !important;
}

.toast-notification.error .toast-icon {
    color: #dc3545 !important;
}

.toast-notification.warning {
    border-left-color: #ffc107 !important;
}

.toast-notification.warning .toast-icon {
    color: #ffc107 !important;
}

.toast-notification.info {
    border-left-color: #17a2b8 !important;
}

.toast-notification.info .toast-icon {
    color: #17a2b8 !important;
}

/* Toast Icon */
.toast-icon {
    font-size: 24px !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
    color: inherit !important;
}

/* Toast Content */
.toast-content {
    flex: 1 !important;
}

.toast-title {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0 0 4px 0 !important;
    color: #2c3e50 !important;
}

.toast-message {
    font-size: 14px !important;
    margin: 0 !important;
    color: #6c757d !important;
    line-height: 1.5 !important;
}

/* Toast Close Button */
.toast-close {
    background: none !important;
    border: none !important;
    font-size: 16px !important;
    color: #999 !important;
    cursor: pointer !important;
    padding: 4px !important;
    width: 24px !important;
    height: 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: all 0.2s !important;
    border-radius: 4px !important;
    opacity: 0.7 !important;
}

.toast-close:hover {
    color: #666 !important;
    background: rgba(0, 0, 0, 0.1) !important;
    opacity: 1 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 60px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        bottom: auto !important;
    }
    
    .toast-notification {
        width: 100% !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .toast-notification {
        background: #2c3e50;
    }
    
    .toast-title {
        color: #ecf0f1;
    }
    
    .toast-message {
        color: #bdc3c7;
    }
    
    .toast-close {
        color: #95a5a6;
    }
    
    .toast-close:hover {
        color: #ecf0f1;
    }
}

/* Stacking effect for multiple toasts */
.toast-container .toast-notification:nth-child(n+4) {
    opacity: 0.5;
    transform: scale(0.95) translateY(-5px);
}

.toast-container .toast-notification:nth-child(n+5) {
    display: none;
}
