/* ============================================================
   Announcements board, service directory & lost-found styles
   ============================================================ */

.ann-empty { text-align: center; padding: 40px 20px; color: #999; }

/* ---------- Announcements ---------- */
.ann-list { display: flex; flex-direction: column; gap: 14px; }

.ann-card {
    border: 1px solid #eee;
    border-right: 5px solid #9e9e9e;
    border-radius: 12px;
    padding: 16px 18px;
    background: #fff;
    transition: box-shadow .15s ease;
}
.ann-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,.08); }
.ann-card.pri-important { border-right-color: #ff9800; background: #fffaf2; }
.ann-card.pri-urgent { border-right-color: #d40000; background: #fff5f5; }
.ann-card.pinned { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

.ann-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; }
.ann-title { font-size: 18px; font-weight: 800; color: #222; margin: 0; }
.ann-badges { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ann-chip { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #eef1f4; color: #555; white-space: nowrap; }
.ann-chip.cat { background: #e8f0fe; color: #1558c0; }
.ann-chip.urgent { background: #ffe0e0; color: #c00; }
.ann-chip.important { background: #fff3cd; color: #946200; }
.ann-chip.pin { background: #e7f6ec; color: #2e7d32; }

.ann-body { color: #444; line-height: 1.7; margin: 10px 0 0; white-space: pre-wrap; }
.ann-gallery { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.ann-img { max-width: 100%; border-radius: 10px; max-height: 220px; object-fit: cover; cursor: pointer; }
.ann-gallery .ann-img { width: calc(33.333% - 6px); min-width: 120px; height: 140px; }
.ann-meta { margin-top: 10px; font-size: 12px; color: #999; display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-actions { display: flex; gap: 8px; }
.ann-actions button { border: none; border-radius: 7px; padding: 5px 12px; cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 700; }
.ann-edit { background: #e8f0fe; color: #1558c0; }
.ann-del { background: #ffe0e0; color: #c00; }

/* ---------- Service contacts directory ---------- */
.contacts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }

.contact-card {
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 14px 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.contact-cat { font-size: 12px; font-weight: 700; color: #1558c0; background: #e8f0fe; align-self: flex-start; padding: 2px 10px; border-radius: 999px; }
.contact-name { font-size: 16px; font-weight: 800; color: #222; }
.contact-desc { font-size: 13px; color: #666; }
.contact-hours { font-size: 12px; color: #999; }
.contact-actions { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.contact-btn { flex: 1; text-align: center; text-decoration: none; border-radius: 8px; padding: 8px; font-size: 13px; font-weight: 700; min-width: 90px; }
.contact-call { background: #1565c0; color: #fff; }
.contact-wa { background: #25d366; color: #fff; }
.contact-admin { display: flex; gap: 8px; margin-top: 4px; }
.contact-admin button { flex: 1; border: none; border-radius: 7px; padding: 5px; cursor: pointer; font-size: 12px; font-weight: 700; font-family: inherit; }

/* ---------- Lost & Found ---------- */
.lf-filters { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.lf-filter { border: 1px solid #ddd; background: #fff; border-radius: 999px; padding: 6px 16px; cursor: pointer; font-family: inherit; font-size: 13px; }
.lf-filter.active { background: #333; color: #fff; border-color: #333; }

.lf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }

.lf-card {
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
}
.lf-card.resolved { opacity: .65; }
.lf-photo { width: 100%; height: 160px; object-fit: cover; background: #f3f3f3; cursor: pointer; }
.lf-thumbs { display: flex; gap: 4px; padding: 4px; flex-wrap: wrap; background: #f3f3f3; }
.lf-thumbs img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; cursor: pointer; }
.lf-photo-placeholder { width: 100%; height: 110px; display: flex; align-items: center; justify-content: center; font-size: 42px; background: #f3f3f3; }
.lf-content { padding: 12px 14px; display: flex; flex-direction: column; gap: 5px; }
.lf-type { align-self: flex-start; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; }
.lf-type.lost { background: #ffe0e0; color: #c00; }
.lf-type.found { background: #e7f6ec; color: #2e7d32; }
.lf-title { font-size: 16px; font-weight: 800; color: #222; }
.lf-desc { font-size: 13px; color: #555; line-height: 1.6; }
.lf-info { font-size: 12px; color: #888; }
.lf-info b { color: #555; }
.lf-phone a { color: #1565c0; text-decoration: none; font-weight: 700; }
.lf-resolved-badge { font-size: 12px; font-weight: 700; color: #2e7d32; }
.lf-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.lf-actions button { flex: 1; border: none; border-radius: 7px; padding: 6px; cursor: pointer; font-size: 12px; font-weight: 700; font-family: inherit; min-width: 80px; }
.lf-resolve { background: #e7f6ec; color: #2e7d32; }
.lf-reopen { background: #fff3cd; color: #946200; }
.lf-del { background: #ffe0e0; color: #c00; }

/* Dark mode */
body.dark-mode .ann-card,
body.dark-mode .contact-card,
body.dark-mode .lf-card { background: #1f2733; border-color: #33404f; }
body.dark-mode .ann-title,
body.dark-mode .contact-name,
body.dark-mode .lf-title { color: #e2e8f0; }
body.dark-mode .ann-body,
body.dark-mode .lf-desc { color: #cbd5e1; }

/* ============================================================
   Pinned announcement -> dismissible sticky banner (bottom)
   ============================================================ */
/* Fixed container that stacks up to 3 announcement cards above the
   bottom action bar. Grows upward (anchored by `bottom`). */
.sticky-ann-stack {
    position: fixed;
    bottom: 110px;           /* sit above the bottom corner buttons (SOS / notifications) */
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 520px;
    z-index: 8600;           /* below the SOS/notification FABs (9000+) */
    display: flex;
    flex-direction: column;
    gap: 12px;
    direction: rtl;
}

.sticky-ann-banner {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 2px solid #d40000;
    border-radius: 14px;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
    direction: rtl;
    animation: sab-pop .25s ease;
}
.sticky-ann-banner.sab-urgent { border-color: #d40000; background: #fff7f7; }

@keyframes sab-pop {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.sab-img {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    object-fit: cover;
    border-radius: 10px;
    background: #f3f3f3;
}
.sab-img-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}
.sab-content { flex: 1; min-width: 0; }
.sab-title {
    font-weight: 800;
    font-size: 15px;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sab-body {
    font-size: 12px;
    color: #666;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sab-btn {
    flex-shrink: 0;
    border: none;
    background: #d40000;
    color: #fff;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}
.sab-btn:hover { filter: brightness(.95); }
.sab-close {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: #333;
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.sab-close:hover { background: #000; }

body.dark-mode .sticky-ann-banner { background: #1f2733; }
body.dark-mode .sab-title { color: #e2e8f0; }
body.dark-mode .sab-body { color: #cbd5e1; }
