/**
 * Raadhuis Alert Message frontend style
 */

/* Base notification styles */
.raadhuis-notificatie {
    position: sticky;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    /* Background and text colors are now set dynamically via inline styles */
    padding: 1rem 1.25rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
    transition: all 0.3s ease-in-out;
}

/* Top notification - renders in header context */
.notificatie-top {
    top: 0;
}

/* Bottom notification - renders in footer context */
.notificatie-bottom {
    bottom: 0;
}

/* Notification content layout */
.notificatie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--wp--style--global--wide-size);
    margin: 0 auto;
    gap: 1.25rem;
}

.notificatie-text {
    flex: 1;
}

.notificatie-text h3 {
    margin: 0 0 .5rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.2;
}

.notificatie-text p {
    margin: 0;
    font-size: .875rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Dismiss button */
.notificatie-dismiss {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.notificatie-dismiss:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notificatie-dismiss:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Responsive design */
@media (max-width: 768px) {
    .raadhuis-notificatie {
        padding: .75rem 1rem;
    }

    .notificatie-text h3 {
        font-size: 1rem;
    }

    .notificatie-text p {
        font-size: .8125rem;
    }

    .notificatie-content {
        gap: .75rem;
    }
}

@media (max-width: 480px) {
    .notificatie-text h3 {
        font-size: .9375rem;
        margin-bottom: .25rem;
    }

    .notificatie-text p {
        font-size: .75rem;
    }

    .notificatie-dismiss {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 1rem;
    }
}

/* Animation classes */
.raadhuis-notificatie.fade-in {
    animation: slideInFade 0.3s ease-out;
}

.raadhuis-notificatie.fade-out {
    animation: slideOutFade 0.3s ease-in;
}

/* Keyframe animations */
@keyframes slideInFade {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Bottom notification animations */
.notificatie-bottom.fade-in {
    animation: slideInFadeBottom 0.3s ease-out;
}

.notificatie-bottom.fade-out {
    animation: slideOutFadeBottom 0.3s ease-in;
}

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

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

/* Auto-dismissing state */
.raadhuis-notificatie.auto-dismissing {
    opacity: 0.8;
}

/* Body class for notifications present */
.has-raadhuis-notifications {
    position: relative;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .raadhuis-notificatie {
        border: 2px solid #ffffff;
    }

    .notificatie-dismiss {
        background: #ffffff;
        color: #2563eb;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .raadhuis-notificatie {
        transition: none;
        animation: none;
    }

    .raadhuis-notificatie.fade-in,
    .raadhuis-notificatie.fade-out {
        animation: none;
    }
}

/* Print styles */
@media print {
    .raadhuis-notificatie {
        display: none;
    }
}