/**
 * Header Notification Bar Styles
 * 
 * Styles for the frontend notification bar that appears below the main navigation.
 * 
 * @package Autodebruin
 * @since 1.0.0
 */

/* ==========================================================================
   Notification Bar - Base Styles
   ========================================================================== */

.header-notification-bar {
    position: relative;
    z-index: 1006;
    /* Higher than mobile menu (1005), but within normal flow */
    padding: 12px 20px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    transition: all 0.3s ease;
    /* Ensure it doesn't overlap the header */
    margin-top: 0;
}

.header-notification-bar.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1006;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* When sticky header and notification are both active - only affects fixed headers */
body.has-sticky-notification .c-sticky-header.is-sticky,
body.has-sticky-notification .c-sticky-header[style*="position: fixed"] {
    top: 44px !important;
}

/* Notification container */
.notification-bar-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 50px;
}

/* Icon styling */
.notification-bar-icon {
    flex-shrink: 0;
    font-size: 18px;
    opacity: 0.9;
}

/* Text styling */
.notification-bar-text {
    flex-grow: 0;
}

/* Link styling */
.notification-bar-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.notification-bar-link:hover {
    opacity: 0.85;
    text-decoration: underline;
}

/* Close button */
.notification-bar-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 8px;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    line-height: 1;
}

.notification-bar-close:hover {
    opacity: 1;
}

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

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media (max-width: 1024px) {
    .header-notification-bar {
        padding: 10px 15px;
        font-size: 14px;
    }

    .notification-bar-container {
        padding: 0 40px;
    }

    .notification-bar-icon {
        font-size: 16px;
    }

    .notification-bar-close {
        right: 10px;
        padding: 6px;
    }

    body.has-sticky-notification .c-sticky-header.is-sticky,
    body.has-sticky-notification .c-sticky-header[style*="position: fixed"] {
        top: 40px !important;
    }
}

@media (max-width: 768px) {
    .header-notification-bar {
        padding: 10px 45px 10px 15px;
        font-size: 13px;
    }

    .notification-bar-container {
        padding: 0;
        justify-content: flex-start;
        text-align: left;
    }

    .notification-bar-icon {
        font-size: 14px;
    }

    .notification-bar-close {
        right: 8px;
        font-size: 14px;
    }

    body.has-sticky-notification .c-sticky-header.is-sticky,
    body.has-sticky-notification .c-sticky-header[style*="position: fixed"] {
        top: 38px !important;
    }
}

/* ==========================================================================
   Animation
   ========================================================================== */

.header-notification-bar.is-hiding {
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 1;
        max-height: 60px;
    }

    to {
        opacity: 0;
        max-height: 0;
        padding-top: 0;
        padding-bottom: 0;
        margin: 0;
    }
}