/* AIA Announcements – Frontend */

.aiaan-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 16px 40px;
    font-family: inherit;
}

/* ── Header ── */
.aiaan-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 0 20px;
    flex-wrap: wrap;
}

.aiaan-header-icon { font-size: 2rem; }

.aiaan-title {
    margin: 0;
    font-size: 1.7rem;
    color: #1a202c;
    flex: 1;
}

.aiaan-unread-badge {
    display: inline-block;
    background: #ef4444;
    color: #fff;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* ── Filters ── */
.aiaan-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    align-items: center;
}

.aiaan-filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.aiaan-filter-label {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-inline-end: 4px;
}

.aiaan-filter-btn {
    display: inline-block;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    transition: all 0.15s;
}

.aiaan-filter-btn:hover,
.aiaan-filter-btn--active {
    background: #1e40af;
    color: #fff !important;
    border-color: #1e40af;
}

/* ── Grid ── */
.aiaan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ── Card ── */
.aiaan-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.15s;
}

.aiaan-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }

.aiaan-card--unread { border-inline-start: 4px solid #1e40af; }
.aiaan-card--read   { opacity: 0.85; }

.aiaan-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aiaan-type-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.aiaan-read-indicator {
    color: #16a34a;
    font-size: 18px;
    font-weight: 700;
}

.aiaan-unread-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #1e40af;
    flex-shrink: 0;
}

.aiaan-card-title {
    margin: 0;
    font-size: 1rem;
    color: #1a202c;
    line-height: 1.4;
}

.aiaan-card-date {
    margin: 0;
    font-size: 12px;
    color: #94a3b8;
}

/* ── Card footer ── */
.aiaan-card-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.aiaan-readmore-btn {
    display: inline-block;
    padding: 8px 18px;
    background: #1e40af;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.aiaan-readmore-btn:hover { background: #1e3a8a; }

.aiaan-card-acked {
    font-size: 12px;
    color: #16a34a;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Acknowledge button (inside modal) ── */
.aiaan-ack-btn {
    display: inline-block;
    padding: 11px 22px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: background 0.15s;
}

.aiaan-ack-btn:hover { background: #15803d; }

.aiaan-acked-label {
    font-size: 14px;
    color: #16a34a;
    font-weight: 600;
}

.aiaan-ack-date {
    font-size: 12px;
    color: #86efac;
    font-weight: 400;
    margin-inline-start: 4px;
}

/* ── Modal ── */
.aiaan-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99999;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 16px;
    overflow-y: auto;
}

.aiaan-modal-overlay--open { display: flex; }

.aiaan-modal {
    background: #fff;
    border-radius: 14px;
    max-width: 760px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    padding: 32px 36px 28px;
    animation: aiaan-modal-in 0.2s ease;
}

@keyframes aiaan-modal-in {
    from { opacity: 0; transform: translateY(-16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aiaan-modal-close {
    position: absolute;
    top: 14px;
    inset-inline-end: 18px;
    background: none;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    transition: background 0.15s, color 0.15s;
}

.aiaan-modal-close:hover { background: #f1f5f9; color: #334155; }

.aiaan-modal-head {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.aiaan-modal-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
}

.aiaan-modal-title {
    margin: 0 0 8px;
    font-size: 1.5rem;
    color: #0f172a;
    line-height: 1.3;
}

.aiaan-modal-date {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
}

.aiaan-modal-body {
    color: #1e293b;
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 24px;
}

.aiaan-modal-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 12px 0;
}

.aiaan-modal-body h1,
.aiaan-modal-body h2,
.aiaan-modal-body h3 { line-height: 1.3; }

.aiaan-modal-body a { color: #1e40af; }

.aiaan-modal-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    text-align: center;
}

@media (max-width: 640px) {
    .aiaan-modal { padding: 24px 20px; }
    .aiaan-modal-title { font-size: 1.25rem; }
}

/* ── Empty state ── */
.aiaan-empty {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
    grid-column: 1 / -1;
}

.aiaan-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
}

.aiaan-notice {
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px solid #fbbf24;
    border-radius: 6px;
}

@media (max-width: 640px) {
    .aiaan-grid { grid-template-columns: 1fr; }
    .aiaan-title { font-size: 1.3rem; }
}
