.custom-alert {
    display: inline-block;
    text-align: center;
    margin: 10px auto;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); 
}

/* Ensure notifications are visible above all content */
#notification-container {
    position: fixed;
    top: 20px;
    left: 20px; 
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 350px;
    max-width: 90vw;
    pointer-events: none;
}

.notification {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    position: relative;
    transform: translateX(-120%); /* Changed to negative for left side animation */
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: auto;
    margin-bottom: 10px;
    border-right: 4px solid #1d1d1b; /* Changed from left to right border */
    border-left: none; /* Removed left border */
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(-120%); /* Changed to negative for left side animation */
    opacity: 0;
}

.notification-icon {
    font-size: 24px;
    margin-right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: bold;
    margin-bottom: 4px;
    font-size: 16px;
}

.notification-message {
    color: #555;
    font-size: 14px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    transition: color 0.2s;
    pointer-events: auto;
}

.notification-close:hover {
    color: #555;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
}

/* Success notification */
.notification-success {
    border-right-color: #28a745; /* Changed from left to right */
}

.notification-success .notification-icon {
    color: #28a745;
}

.notification-success .notification-title {
    color: #28a745;
}

.notification-success .notification-message {
    color: #4caf50; /* Lightened the success message color for better readability */
}

.notification-success .notification-progress {
    background-color: #28a745;
}

/* Error notification */
.notification-error {
    border-right-color: #dc3545; /* Changed from left to right */
}

.notification-error .notification-icon {
    color: #dc3545;
}

.notification-error .notification-title {
    color: #dc3545;
}

.notification-error .notification-progress {
    background-color: #dc3545;
}

/* Warning notification */
.notification-warning {
    border-right-color: #ffc107; /* Changed from left to right */
}

.notification-warning .notification-icon {
    color: #ffc107;
}

.notification-warning .notification-title {
    color: #ffc107;
}

.notification-warning .notification-progress {
    background-color: #ffc107;
}

/* Info notification */
.notification-info {
    border-right-color: #17a2b8; /* Changed from left to right */
}

.notification-info .notification-icon {
    color: #17a2b8;
}

.notification-info .notification-title {
    color: #17a2b8;
}

.notification-info .notification-progress {
    background-color: #17a2b8;
}

/* Animation for notification entry */
@keyframes slideIn {
    from {
        transform: translateX(-120%); /* Changed to negative for left side animation */
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-120%); /* Changed to negative for left side animation */
        opacity: 0;
    }
}

/* Media query for mobile */
@media (max-width: 576px) {
    #notification-container {
        width: calc(100% - 40px);
        left: 20px; /* Changed from right to left */
        right: 20px;
        max-width: none;
    }
}

/* Add a gentle hover effect */
.notification:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .notification {
        background-color: #2d2d2d;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .notification-message {
        color: #e0e0e0;
    }
    
    .notification-close {
        color: #aaa;
    }
    
    .notification-close:hover {
        color: #fff;
    }
    
    .notification-success .notification-message {
        color: #6ebb7b; /* Brighter green for dark mode */
    }
}

/* Add styling for the notification wrapper in the header */
.notification-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 10px 0;
    position: relative;
    z-index: 1000;
}

/* Ensure global notifications are visible across the site */
.global-notification-container {
    position: relative;
    z-index: 9999;
}