/**
 * ARF Notice Management - Styling (Marquee & Popup)
 * File: assets/css/notices.css
 */

/* ==========================================================================
   1. GLOBAL MARQUEE NOTICES BAR
   ========================================================================== */
.arf-notice-marquee-bar {
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 10px 0;
    overflow: hidden;
    position: relative;
    z-index: 1050;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: none; /* Injected dynamically if notices exist */
}

.arf-notice-marquee-container {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.arf-notice-marquee-label {
    background: #ef4444; /* Emergency indicator style */
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    margin-right: 15px;
    flex-shrink: 0;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(239, 68, 68, 0.3);
}

.arf-notice-marquee-track {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    height: 24px;
    display: flex;
    align-items: center;
}

.arf-notice-marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: arfMarquee 25s linear infinite;
    cursor: pointer;
}

.arf-notice-marquee-content:hover {
    animation-play-state: paused;
}

.arf-notice-item {
    display: inline-block;
    margin-right: 60px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: color 0.2s ease;
}

.arf-notice-item:hover {
    color: #3b82f6;
}

.arf-notice-item i {
    margin-right: 8px;
    color: #f59e0b; /* Golden accent icon */
}

@keyframes arfMarquee {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Adjust main navbar top spacing if marquee is visible */
body.has-marquee {
    margin-top: 0; /* Handled gracefully by flex layout or natural flow */
}


/* ==========================================================================
   2. PREMIUM POPUP MODAL
   ========================================================================== */
.arf-notice-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 20px;
}

.arf-notice-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.arf-notice-popup-card {
    background: #ffffff;
    width: 100%;
    max-width: 500px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.arf-notice-popup-overlay.active .arf-notice-popup-card {
    transform: scale(1);
}

/* Header style based on priority/featured */
.arf-notice-popup-header {
    padding: 20px 24px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
}

.arf-notice-popup-header.priority-high {
    background: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);
}

.arf-notice-popup-header.featured-notice {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}

.arf-notice-popup-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.2px;
}

.arf-notice-popup-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.arf-notice-popup-close:hover {
    color: #ffffff;
}

.arf-notice-popup-image-container {
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.arf-notice-popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arf-notice-popup-body {
    padding: 24px;
    max-height: 280px;
    overflow-y: auto;
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.6;
}

.arf-notice-popup-body h4 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.25rem;
    color: #1e293b;
    font-weight: 700;
}

.arf-notice-popup-body p {
    margin: 0 0 16px 0;
}

.arf-notice-popup-body p:last-child {
    margin-bottom: 0;
}

.arf-notice-popup-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.arf-notice-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
}

.arf-notice-btn-close {
    background: #e2e8f0;
    color: #475569;
    border: none;
}

.arf-notice-btn-close:hover {
    background: #cbd5e1;
}

.arf-notice-btn-action {
    background: #1e3a8a;
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.2);
}

.arf-notice-btn-action:hover {
    background: #1d4ed8;
}

.arf-notice-popup-body::-webkit-scrollbar {
    width: 6px;
}

.arf-notice-popup-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.arf-notice-popup-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.arf-notice-popup-body::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .arf-notice-popup-card {
        max-width: 92%;
    }
    
    .arf-notice-popup-image-container {
        height: 180px;
    }
    
    .arf-notice-popup-body {
        padding: 20px;
        max-height: 240px;
    }
    
    .arf-notice-popup-footer {
        padding: 12px 20px;
    }
}
