/* Notification System Styles */

/* Container for notifications */
.notification-container {
    position: fixed;
    top: 20px; /* Adjust as needed */
    right: 20px; /* Adjust as needed */
    z-index: 1050; /* Ensure it's above most other content */
    width: 350px; /* Max width of notifications */
    display: flex;
    flex-direction: column;
    gap: 10px; /* Spacing between notifications */
    /* Remove overflow: hidden; to ensure visibility during animation */
}

/* Keyframes for slide-in animation */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Individual notification */
.notification {
    background-color: #fff;
    color: #333;
    border-radius: 8px;
    padding: 15px 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start; /* Align items to the top */
    gap: 15px;
    opacity: 1; /* Start fully opaque (animation handles fade-in) */
    /* Remove initial transform */
    /* Apply the slide-in animation */
    animation: slideInFromRight 0.4s ease-in-out forwards;
    /* Transition for slide-out */
    transition: opacity 0.4s ease, transform 0.4s ease-in-out;
    border-left: 5px solid; /* Default border, color set by type */
    position: relative; /* For close button positioning */
    overflow: hidden; /* Ensure content stays within rounded corners */
    margin-bottom: 10px; /* Add some bottom margin if gap isn't enough */
}

/* Fade-out and slide-out animation (uses transition) */
.notification.fade-out {
    opacity: 0;
    /* Slide out fully to the right */
    transform: translateX(calc(100% + 20px)); /* Add extra px to clear the container padding */
    /* Prevent the slide-in animation from re-running if class is removed/re-added quickly */
    animation: none;
}

/* Notification Icons */
.notification-icon {
    font-size: 1.4rem;
    flex-shrink: 0; /* Prevent icon from shrinking */
    margin-top: 2px; /* Align icon slightly better with text */
}

/* Notification Message */
.notification-message {
    flex-grow: 1; /* Allow message to take available space */
    font-size: 0.95rem;
    line-height: 1.4;
}

/* Close Button */
.notification-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    margin-left: 10px; /* Space between message and close button */
    transition: color 0.2s ease;
    align-self: flex-start; /* Align close button to the top right */
}

.notification-close:hover {
    color: #333;
}

/* Notification Types */
.notification-info {
    border-left-color: #17a2b8; /* Bootstrap info blue */
}
.notification-info .notification-icon {
    color: #17a2b8;
}

.notification-success {
    border-left-color: #28a745; /* Bootstrap success green */
}
.notification-success .notification-icon {
    color: #28a745;
}

.notification-warning {
    border-left-color: #ffc107; /* Bootstrap warning yellow */
}
.notification-warning .notification-icon {
    color: #ffc107;
}

.notification-error {
    border-left-color: #dc3545; /* Bootstrap danger red */
}
.notification-error .notification-icon {
    color: #dc3545;
}

/* Responsive adjustments (optional) */
@media (max-width: 480px) {
    .notification-container {
        width: calc(100% - 40px); /* Full width minus margins */
        left: 20px;
        right: 20px;
    }
}
