/* نبض جنوب — واجهة PWA خفيفة */
:root {
	--nabd-red: #e3000f;
	--nabd-red-deep: #b8000c;
	--nabd-ink: #111827;
	--nabd-muted: #6b7280;
	--nabd-bg: #f6f7f9;
	--nabd-card: #ffffff;
	--nabd-line: #e5e7eb;
	--nabd-radius: 16px;
	--nabd-safe-top: env(safe-area-inset-top, 0px);
	--nabd-safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html.janoob-nabd-html,
body.janoob-nabd-body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: var(--nabd-bg);
	color: var(--nabd-ink);
	font-family: Cairo, Tahoma, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.nabd-app {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	padding-bottom: calc(88px + var(--nabd-safe-bottom));
}

.nabd-top {
	position: sticky;
	top: 0;
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: calc(12px + var(--nabd-safe-top)) 14px 12px;
	background: linear-gradient(180deg, #fff 0%, #fff 70%, rgba(246, 247, 249, 0.92) 100%);
	border-bottom: 1px solid var(--nabd-line);
	backdrop-filter: blur(8px);
}

.nabd-top__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.nabd-top__logo {
	width: 40px; height: 40px; border-radius: 12px;
	box-shadow: 0 6px 16px rgba(227, 0, 15, 0.28);
	object-fit: cover;
}
.nabd-top__titles { display: flex; flex-direction: column; min-width: 0; }
.nabd-top__name { font-size: 1.05rem; font-weight: 900; line-height: 1.2; }
.nabd-top__sub { font-size: 0.72rem; color: var(--nabd-muted); font-weight: 700; }
.nabd-top__sub--he { font-size: 0.68rem; font-weight: 600; opacity: 0.9; }
.nabd-pref--sound { border-color: #bfdbfe; background: #eff6ff; }
.nabd-link--center { display: block; width: 100%; text-align: center; margin-top: 10px; }
.nabd-sheet--consent { z-index: 80; }
.nabd-top__actions { display: flex; align-items: center; gap: 8px; }

.nabd-pulse {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 0;
	border-radius: 999px;
	padding: 7px 12px;
	background: var(--nabd-red);
	color: #fff;
	font-family: inherit;
	font-weight: 800;
	font-size: 0.78rem;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(227, 0, 15, 0.35);
	animation: nabd-pulse-glow 1.8s ease-in-out infinite;
}
.nabd-pulse__dot {
	width: 8px; height: 8px; border-radius: 50%; background: #fff;
	box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
	animation: nabd-dot 1.4s infinite;
}
.nabd-pulse__count { font-variant-numeric: tabular-nums; }
@keyframes nabd-dot {
	0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
	70% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
@keyframes nabd-pulse-glow {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.03); }
}

.nabd-icon-btn {
	width: 40px; height: 40px; border-radius: 12px;
	border: 1px solid var(--nabd-line); background: #fff;
	font-size: 1.1rem; cursor: pointer; color: var(--nabd-ink);
}

.nabd-install {
	margin: 12px 14px 0;
	padding: 14px;
	border-radius: var(--nabd-radius);
	background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
	border: 1px solid #fecaca;
}
.nabd-install__env {
	display: inline-flex;
	margin: 0 0 8px;
	padding: 4px 10px;
	border-radius: 999px;
	background: #111827;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 800;
}
.nabd-install__title { margin: 0 0 6px; font-weight: 900; font-size: 0.95rem; }
.nabd-install__hint { margin: 0 0 10px; color: var(--nabd-muted); font-size: 0.82rem; line-height: 1.65; }
.nabd-install__steps {
	margin: 0 0 12px;
	padding: 0 1.2rem 0 0;
	color: var(--nabd-ink);
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1.7;
}
.nabd-install__steps li { margin-bottom: 4px; }
.nabd-install.is-ready {
	border-color: #86efac;
	background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
	box-shadow: 0 8px 24px rgba(16, 185, 129, 0.15);
}
.nabd-install.is-ready .nabd-btn--primary {
	animation: nabd-install-pulse 1.6s ease-in-out infinite;
}
@keyframes nabd-install-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.03); }
}

.nabd-filters {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding: 12px 14px 4px;
	scrollbar-width: none;
}
.nabd-filters::-webkit-scrollbar { display: none; }
.nabd-chip {
	flex: 0 0 auto;
	border: 1px solid var(--nabd-line);
	background: #fff;
	border-radius: 999px;
	padding: 8px 14px;
	font-family: inherit;
	font-weight: 800;
	font-size: 0.8rem;
	color: var(--nabd-muted);
	cursor: pointer;
}
.nabd-chip.is-active {
	background: var(--nabd-red);
	border-color: var(--nabd-red);
	color: #fff;
}

.nabd-main { flex: 1; padding: 8px 14px 24px; }
.nabd-status {
	margin: 8px 0 12px;
	text-align: center;
	color: var(--nabd-muted);
	font-size: 0.85rem;
	font-weight: 700;
}
.nabd-feed { display: flex; flex-direction: column; gap: 10px; }

.nabd-card {
	display: block;
	width: 100%;
	text-align: right;
	border: 1px solid var(--nabd-line);
	background: var(--nabd-card);
	border-radius: var(--nabd-radius);
	padding: 14px 14px 12px;
	font-family: inherit;
	color: inherit;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}
.nabd-card__hit {
	display: block;
	width: 100%;
	border: 0;
	background: transparent;
	padding: 0;
	margin: 0;
	text-align: right;
	font-family: inherit;
	color: inherit;
	cursor: pointer;
}
.nabd-card__hit:active { transform: scale(0.99); }
.nabd-card.is-ajel_main {
	border-color: #fecaca;
	background: linear-gradient(180deg, #fff 0%, #fff8f8 100%);
}
.nabd-card.is-local {
	border-color: #fde68a;
}
.nabd-card.is-news {
	border-color: #e5e7eb;
}
.nabd-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}
.nabd-card__badge {
	display: inline-flex;
	align-items: center;
	border-radius: 999px;
	padding: 3px 10px;
	font-size: 0.68rem;
	font-weight: 900;
	background: #fee2e2;
	color: var(--nabd-red-deep);
}
.nabd-card.is-local .nabd-card__badge { background: #fef3c7; color: #92400e; }
.nabd-card.is-opinion .nabd-card__badge { background: #e0e7ff; color: #3730a3; }
.nabd-card.is-community .nabd-card__badge { background: #d1fae5; color: #065f46; }
.nabd-card.is-news .nabd-card__badge { background: #e5e7eb; color: #374151; }
.nabd-card__time { font-size: 0.72rem; color: var(--nabd-muted); font-weight: 700; direction: ltr; }
.nabd-card__title {
	margin: 0;
	font-size: 0.98rem;
	font-weight: 800;
	line-height: 1.55;
}
.nabd-card__excerpt {
	margin: 8px 0 0;
	font-size: 0.84rem;
	line-height: 1.65;
	color: #4b5563;
	font-weight: 600;
}
.nabd-card__more {
	display: inline-flex;
	margin-top: 10px;
	font-size: 0.82rem;
	font-weight: 900;
	color: var(--nabd-red);
	text-decoration: none;
	border-bottom: 1px solid rgba(227, 0, 15, 0.35);
}

.nabd-bottom {
	position: fixed;
	inset-inline: 0;
	bottom: 0;
	z-index: 35;
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	gap: 8px;
	padding: 10px 14px calc(10px + var(--nabd-safe-bottom));
	background: rgba(255, 255, 255, 0.94);
	border-top: 1px solid var(--nabd-line);
	backdrop-filter: blur(10px);
}
.nabd-bottom__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	border-radius: 12px;
	border: 1px solid var(--nabd-line);
	background: #fff;
	color: var(--nabd-ink);
	text-decoration: none;
	font-family: inherit;
	font-weight: 800;
	font-size: 0.8rem;
	cursor: pointer;
}
.nabd-bottom__link--accent {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #047857;
}
.nabd-bottom__note {
	grid-column: 1 / -1;
	margin: 0;
	text-align: center;
	font-size: 0.7rem;
	color: var(--nabd-muted);
	font-weight: 700;
}

.nabd-btn {
	border: 0;
	border-radius: 999px;
	padding: 11px 18px;
	font-family: inherit;
	font-weight: 900;
	font-size: 0.9rem;
	cursor: pointer;
}
.nabd-btn--primary { background: var(--nabd-red); color: #fff; }
.nabd-btn--ghost {
	background: transparent;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.35);
}
.nabd-btn--ghost-dark {
	background: #f3f4f6;
	color: var(--nabd-ink);
	border: 1px solid var(--nabd-line);
	margin-bottom: 10px;
}
.nabd-btn--block { width: 100%; }
.nabd-btn--wa {
	background: #25d366;
	color: #fff;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.nabd-btn--wa-channel {
	background: #fff;
	color: #047857;
	border: 1px solid #a7f3d0;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
.nabd-link {
	display: inline-block;
	margin-top: 8px;
	border: 0;
	background: transparent;
	color: var(--nabd-muted);
	font-family: inherit;
	font-weight: 800;
	font-size: 0.8rem;
	cursor: pointer;
	text-decoration: underline;
}

.nabd-contact-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 14px;
}
.nabd-social-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin-bottom: 12px;
}
.nabd-social-ico {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border-radius: 12px;
	border: 1px solid var(--nabd-line);
	background: #fff;
	color: var(--nabd-ink);
	text-decoration: none;
	font-size: 0.72rem;
	font-weight: 900;
	font-family: inherit;
}
.nabd-social-ico[data-id="facebook"] { color: #1877f2; }
.nabd-social-ico[data-id="instagram"] { color: #c13584; }
.nabd-social-ico[data-id="tiktok"] { color: #111; }
.nabd-social-ico[data-id="youtube"] { color: #ff0000; }
.nabd-social-ico[data-id="telegram"] { color: #229ed9; }
.nabd-platforms-link {
	display: block;
	text-align: center;
	font-weight: 800;
	font-size: 0.85rem;
	color: var(--nabd-red);
	text-decoration: none;
	padding: 8px;
}
.nabd-notify-state {
	margin: 0 0 12px;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--nabd-muted);
	text-align: center;
}

.nabd-sheet {
	position: fixed;
	inset: 0;
	z-index: 60;
	background: rgba(15, 23, 42, 0.45);
	display: flex;
	align-items: flex-end;
	justify-content: center;
	padding: 12px;
}
.nabd-sheet__panel {
	width: min(520px, 100%);
	max-height: min(86dvh, 720px);
	overflow: auto;
	background: #fff;
	border-radius: 20px 20px 16px 16px;
	padding: 16px;
}
.nabd-sheet__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 8px;
}
.nabd-sheet__head h2 { margin: 0; font-size: 1.05rem; font-weight: 900; }
.nabd-sheet__intro { margin: 0 0 14px; color: var(--nabd-muted); font-size: 0.84rem; line-height: 1.65; font-weight: 600; }
.nabd-prefs { display: flex; flex-direction: column; gap: 10px; }
.nabd-pref {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px;
	border-radius: 12px;
	border: 1px solid var(--nabd-line);
	font-weight: 800;
	font-size: 0.88rem;
}
.nabd-pref--strong { border-color: #fecaca; background: #fff5f5; }
.nabd-pref--mute { border-style: dashed; color: var(--nabd-muted); }
.nabd-pref input { width: 18px; height: 18px; accent-color: var(--nabd-red); }

.nabd-webview {
	position: fixed;
	inset: 0;
	z-index: 70;
	display: flex;
	flex-direction: column;
	background: #0f172a;
}
.nabd-webview__bar {
	display: flex;
	gap: 8px;
	padding: calc(10px + var(--nabd-safe-top)) 12px 10px;
	background: #111827;
}
.nabd-webview__frame {
	flex: 1;
	width: 100%;
	border: 0;
	background: #fff;
}

[hidden] { display: none !important; }
