/* Header announcement marquee — dimensions/colors set inline from admin (SiteAlertStyles) */
.afrimart-announcement-bar {
    position: relative;
    width: var(--sa-ann-width, 100%);
    min-height: var(--sa-ann-height, 40px);
    height: var(--sa-ann-height, 40px);
    background: var(--sa-ann-bg, #023f8a);
    overflow: hidden;
    z-index: 10050;
    flex-shrink: 0;
    display: block;
    margin: 0 auto;
}

.afrimart-announcement-bar__inner {
    display: flex;
    align-items: center;
    min-height: inherit;
    height: 100%;
    white-space: nowrap;
}

.afrimart-announcement-bar__track {
    display: inline-flex;
    align-items: center;
    gap: 3rem;
    padding: 8px 0;
    animation: afrimartMarquee 28s linear infinite;
}

.afrimart-announcement-bar__text {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--sa-ann-text, #fcb813);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    padding: 0 1.5rem;
    line-height: 1.3;
}

.afrimart-announcement-bar__text--duplicate {
    color: var(--sa-ann-text, #fcb813);
}

@keyframes afrimartMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .afrimart-announcement-bar__inner {
        justify-content: center;
    }
    .afrimart-announcement-bar__track {
        animation: none;
        flex-wrap: wrap;
        justify-content: center;
        white-space: normal;
        text-align: center;
        padding: 10px 16px;
    }
    .afrimart-announcement-bar__text--duplicate {
        display: none;
    }
}

@media (max-width: 575px) {
    .afrimart-announcement-bar__text {
        font-size: 12px;
    }
}

/* Site alert popup */
.site-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10060;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: siteAlertFadeIn 0.3s ease-out;
}

.site-alert-overlay.is-visible {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

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

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

@keyframes siteAlertSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes siteAlertSlideOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
}

.site-alert-popup {
    background: #fff;
    border-radius: 16px;
    max-width: 600px;
    width: calc(100% - 40px);
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(2, 63, 138, 0.3);
    animation: siteAlertSlideIn 0.4s ease-out;
}

.site-alert-popup__header {
    background: #023f8a;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.site-alert-popup__title {
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.site-alert-popup__close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 22px;
    line-height: 1;
    transition: background 0.2s ease, transform 0.2s ease;
}

.site-alert-popup__close:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.site-alert-popup__body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.site-alert-popup__message {
    color: #333;
    font-size: 16px;
    line-height: 1.7;
}

.site-alert-popup__message p {
    margin: 0 0 16px 0;
}

.site-alert-popup__message p:last-child {
    margin-bottom: 0;
}

.site-alert-popup__message strong {
    color: #023f8a;
}

.site-alert-popup__footer {
    padding: 16px 24px 24px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.site-alert-popup__dismiss {
    background: linear-gradient(135deg, #fcb813 0%, #f5a200 100%);
    color: #023f8a;
    border: none;
    padding: 12px 36px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 12px rgba(252, 184, 19, 0.3);
}

.site-alert-popup__dismiss:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(252, 184, 19, 0.4);
}

@media (max-width: 575px) {
    .site-alert-overlay {
        padding: 12px;
    }
    .site-alert-popup {
        border-radius: 12px;
        max-height: 85vh;
    }
    .site-alert-popup__header {
        padding: 16px;
    }
    .site-alert-popup__title {
        font-size: 17px;
    }
    .site-alert-popup__body {
        padding: 16px;
    }
    .site-alert-popup__message {
        font-size: 15px;
    }
    .site-alert-popup__dismiss {
        width: 100%;
    }
}
