/* changev4 - Multiple Notifications with Fade Effects */
/* General Styles for Notification Bar */
#notification-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    background-color: #007cba;
    color: #ffffff;
    font-weight: normal;
    font-size: 14px;
    line-height: 1.4;
}

#notification-bar a {
    color: #fff;
    font-weight: bold;
    transition: color 0.2s ease;
}

#notification-bar a:hover {
    color: #ffcc00;
    text-decoration: none;
}

#notification-bar a:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

#notification-bar.hidden {
    transform: translateY(-100%);
}

/* Adjust body padding when notification bar is displayed */
body.has-notification-bar {
    padding-top: 60px;
}

/* Notification Content */
.notification-content {
    flex: 1;
    text-align: center;
    margin: 0;
    padding: 0;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
    position: relative;
}

/* Fade effect for notification content */
.notification-content.fade-out {
    opacity: 0 !important;
}

.notification-content.fade-in {
    opacity: 1 !important;
}

/* Ensure smooth transitions */
.notification-content.transitioning {
    will-change: opacity;
}

/* Close Button */
#notification-close {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: inherit;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Hover state for close button */
#notification-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Active state for close button */
#notification-close:active {
    transform: scale(0.95);
}

/* Focus state for close button */
#notification-close:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Styles for Admin Bar */
body.admin-bar #notification-bar {
    top: 32px;
}

/* Removed loading indicator as it causes visual artifacts */

/* Mobile and Tablet Responsive Styles */
@media screen and (max-width: 782px) {
    #notification-bar {
        padding: 12px 15px;
        font-size: 13px;
    }

    .notification-content {
        padding: 0 15px;
        font-size: 13px;
    }

    #notification-close {
        width: 28px;
        height: 28px;
        font-size: 20px;
        margin-left: 10px;
    }

    body.has-notification-bar {
        padding-top: 55px;
    }

    body.admin-bar.has-notification-bar {
        padding-top: 101px;
    }

    body.admin-bar #notification-bar {
        top: 46px;
    }
}

/* Mobile Styles for Small Screens */
@media screen and (max-width: 600px) {
    #notification-bar {
        padding: 10px 12px;
    }

    .notification-content {
        padding: 0 10px;
        font-size: 12px;
    }

    #notification-close {
        width: 26px;
        height: 26px;
        font-size: 18px;
        margin-left: 8px;
    }

    body.has-notification-bar {
        padding-top: 50px;
    }

    body.admin-bar.has-notification-bar {
        padding-top: 96px;
    }

    body.admin-bar #notification-bar {
        top: 46px;
    }
}

/* Animation for showing/hiding the notification bar */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

#notification-bar.show {
    animation: slideDown 0.3s ease-out;
}

#notification-bar.hide {
    animation: slideUp 0.3s ease-out;
}

/* Smooth fade animations for content changes */
@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }