/**
 * Premium Announcement System — redesigned Notifications screen.
 * Every rule below is scoped under `.ann-` (or `#bbb-view .ann-…`), so
 * this file can never override or "redesign" anything else used by
 * Dashboard, Home, Quick Links, Content Pages, or the Doctor System.
 * Reuses the app's existing design tokens (--radius-md, --shadow-card,
 * --accent, etc. from assets/css/app.css) so it automatically matches
 * the current theme/branding and Dark Mode — no hardcoded colors that
 * would drift out of sync with a future Branding change.
 */

:root {
	--ann-glass-bg:     rgba(255, 255, 255, 0.72);
	--ann-glass-border: rgba(255, 255, 255, 0.5);
}
[data-theme="dark"] {
	--ann-glass-bg:     rgba(38, 32, 47, 0.62);
	--ann-glass-border: rgba(255, 255, 255, 0.08);
}

/* -------------------------------------------------------------- */
/* Page shell                                                      */
/* -------------------------------------------------------------- */
.ann-page { padding-bottom: 12px; }

.ann-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 16px;
	gap: 10px;
}
.ann-header h1 {
	font-size: 20px;
	font-weight: 800;
	margin: 0;
	letter-spacing: -.01em;
}
.ann-header-btn {
	width: auto;
	padding: 8px 14px;
	font-size: 13px;
	white-space: nowrap;
}

.ann-section-title {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--text-muted);
	margin: 22px 2px 10px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ann-section-title:first-of-type { margin-top: 0; }

.ann-empty {
	text-align: center;
	color: var(--text-muted);
	padding: 34px 20px;
	font-size: 13.5px;
}

.ann-skel {
	height: 150px;
	border-radius: var(--radius-md);
	margin-bottom: 14px;
}

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

.ann-card {
	position: relative;
	background: var(--ann-glass-bg);
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	border: 1px solid var(--ann-glass-border);
	border-radius: var(--radius-md); /* 22px */
	box-shadow: var(--shadow-card);
	padding: 16px 16px 12px;
	overflow: hidden;
	cursor: pointer;
	transition: transform .22s var(--ease-spring), box-shadow .25s var(--ease-smooth);
	opacity: 0;
	transform: translateY(10px);
	animation: annCardIn .5s var(--ease-smooth) forwards;
}
@keyframes annCardIn {
	to { opacity: 1; transform: translateY(0); }
}
.ann-card:active { transform: scale(.985); }
.ann-card:hover { box-shadow: var(--shadow-card-hover); }

.ann-card-pinned {
	border-color: color-mix(in srgb, var(--bbb-gold) 45%, var(--ann-glass-border));
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--bbb-gold) 35%, transparent), var(--shadow-card);
}
.ann-pin-flag {
	position: absolute;
	top: 12px;
	right: 12px;
	font-size: 15px;
	filter: drop-shadow(0 1px 2px rgba(0,0,0,.25));
	z-index: 2;
}

.ann-top-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 10px;
}

.ann-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 11.5px;
	font-weight: 700;
	padding: 5px 10px 5px 8px;
	border-radius: 999px;
	color: #fff;
	line-height: 1.3;
	white-space: nowrap;
}

.ann-time {
	font-size: 11.5px;
	color: var(--text-muted);
	font-weight: 600;
	white-space: nowrap;
	flex-shrink: 0;
}

/* Media */
.ann-media {
	position: relative;
	width: 100%;
	border-radius: 16px;
	overflow: hidden;
	margin-bottom: 12px;
	background: var(--surface);
}
.ann-media img,
.ann-media video {
	display: block;
	width: 100%;
	max-height: 260px;
	object-fit: cover;
}
.ann-video-wrap { position: relative; }
.ann-play-btn {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0,0,0,.18);
}
.ann-play-btn span {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: rgba(255,255,255,.92);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 20px -6px rgba(0,0,0,.45);
	transition: transform .2s var(--ease-spring);
}
.ann-card:hover .ann-play-btn span { transform: scale(1.08); }
.ann-play-btn svg { width: 22px; height: 22px; margin-left: 3px; color: var(--accent); }

/* Body */
.ann-title {
	font-size: 15.5px;
	font-weight: 800;
	margin: 0 0 4px;
	letter-spacing: -.01em;
	color: var(--text);
}
.ann-desc {
	font-size: 13px;
	color: var(--text-muted);
	line-height: 1.55;
	margin: 0 0 12px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Actions row */
.ann-actions {
	display: flex;
	align-items: center;
	gap: 6px;
	border-top: 1px solid var(--border);
	padding-top: 8px;
	margin-top: 2px;
}
.ann-action-btn {
	position: relative;
	overflow: hidden;
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: none;
	border: none;
	padding: 9px 6px;
	border-radius: 12px;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--text-muted);
	cursor: pointer;
	font-family: inherit;
	transition: background .18s var(--ease-smooth), color .18s var(--ease-smooth);
}
.ann-action-btn:hover { background: var(--surface); color: var(--text); }
.ann-action-btn.is-liked { color: var(--accent); }
.ann-action-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.ann-ripple-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; border-radius: inherit; }
.ann-ripple {
	position: absolute;
	border-radius: 50%;
	background: radial-gradient(circle, color-mix(in srgb, var(--accent) 35%, transparent) 0%, transparent 70%);
	transform: scale(0);
	animation: annRipple .6s var(--ease-smooth);
	pointer-events: none;
}
@keyframes annRipple {
	to { transform: scale(2.6); opacity: 0; }
}

.ann-unseen-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--accent);
	display: inline-block;
	flex-shrink: 0;
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent);
}

/* -------------------------------------------------------------- */
/* Legacy system notifications — same visual language, lighter card */
/* -------------------------------------------------------------- */
.ann-legacy-list { display: flex; flex-direction: column; }
.ann-legacy-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 13px 4px;
	border-top: 1px solid var(--border);
	cursor: pointer;
	border-radius: 10px;
	transition: background .15s var(--ease-smooth);
}
.ann-legacy-item:first-child { border-top: none; }
.ann-legacy-item:hover { background: var(--surface); }
.ann-legacy-item.is-read { opacity: .6; }
.ann-legacy-icon {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	flex-shrink: 0;
	background: var(--surface);
}
.ann-legacy-item:not(.is-read) .ann-legacy-icon { background: var(--accent); color: #fff; }
.ann-legacy-title { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.ann-legacy-body { font-size: 12.5px; color: var(--text-muted); line-height: 1.4; }
.ann-legacy-time { font-size: 11px; color: var(--text-muted); margin-left: auto; flex-shrink: 0; white-space: nowrap; padding-top: 2px; }

/* -------------------------------------------------------------- */
/* Detail page                                                     */
/* -------------------------------------------------------------- */
.ann-detail-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: none;
	border: none;
	color: var(--text-muted);
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	padding: 6px 2px 16px;
	font-family: inherit;
}
.ann-detail-back svg { width: 16px; height: 16px; }

.ann-detail-card {
	background: var(--ann-glass-bg);
	backdrop-filter: blur(18px) saturate(160%);
	-webkit-backdrop-filter: blur(18px) saturate(160%);
	border: 1px solid var(--ann-glass-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	padding-bottom: 18px;
}
.ann-detail-media { width: 100%; background: var(--surface); }
.ann-detail-media img, .ann-detail-media video { width: 100%; max-height: 340px; object-fit: cover; display: block; }
.ann-detail-body { padding: 18px 18px 4px; }
.ann-detail-title { font-size: 19px; font-weight: 800; margin: 6px 0 4px; letter-spacing: -.01em; }
.ann-detail-meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); margin-bottom: 14px; }
.ann-detail-desc { font-size: 14px; line-height: 1.75; color: var(--text); }
.ann-detail-desc p { margin: 0 0 12px; }
.ann-detail-desc img { max-width: 100%; border-radius: 10px; }

.ann-detail-cta {
	display: block;
	width: calc(100% - 36px);
	margin: 4px 18px 6px;
	text-align: center;
	padding: 13px;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--bbb-garnet-bright, var(--accent)) 0%, var(--accent) 55%, var(--accent-strong) 100%);
	color: #fff;
	font-weight: 800;
	font-size: 14px;
	text-decoration: none;
	box-shadow: var(--shadow-float);
}

.ann-detail-attachment {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 14px 18px 0;
	padding: 12px 14px;
	border-radius: 14px;
	background: var(--surface);
	text-decoration: none;
	color: var(--text);
}
.ann-detail-attachment svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; }
.ann-detail-attachment-name { font-size: 13px; font-weight: 700; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ann-detail-attachment-dl { font-size: 11.5px; color: var(--text-muted); font-weight: 700; }

.ann-detail-actions {
	display: flex;
	gap: 8px;
	margin: 16px 18px 0;
}
.ann-detail-actions .ann-action-btn {
	background: var(--surface);
	border-radius: 14px;
	padding: 11px 6px;
}
.ann-detail-actions .ann-action-btn:hover { background: var(--accent-soft); color: var(--accent); }

/* -------------------------------------------------------------- */
/* Responsive                                                       */
/* -------------------------------------------------------------- */
@media (max-width: 420px) {
	.ann-media img, .ann-media video { max-height: 200px; }
	.ann-detail-media img, .ann-detail-media video { max-height: 220px; }
	.ann-action-btn span.ann-action-label { display: none; }
}

.ann-blood-alert-badge{background:#d90b24!important;color:#fff!important}
.ann-blood-alert-detail{display:inline-flex;align-items:center;gap:5px;background:#d90b24;color:#fff;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:800;margin:0 0 8px}
.ann-blood-alert-facts{margin:14px 0;padding:12px 14px;background:#fff5f5;border:1px solid #f1c6cc;border-radius:12px;display:grid;gap:7px;font-size:13px}
