/* App control — visibility rules apply only inside the installed app. */
body.ef-app-mode.ef-app-hide-topbar .ef-topbar,
body.ef-app-mode.ef-app-hide-breadcrumbs .ef-breadcrumbs,
body.ef-app-mode.ef-app-hide-badges .ef-single__badges,
body.ef-app-mode.ef-app-hide-meta .ef-single__meta,
body.ef-app-mode.ef-app-hide-share .ef-share-wrap,
body.ef-app-mode.ef-app-hide-related .ef-related,
body.ef-app-mode.ef-app-hide-comments #comments,
body.ef-app-mode.ef-app-hide-comments .ef-comments,
body.ef-app-mode.ef-app-hide-comments .ef-comments-toggle,
body.ef-app-mode.ef-app-hide-sidebar .ef-sidebar,
body.ef-app-mode.ef-app-hide-ads .ef-ad,
body.ef-app-mode.ef-app-hide-telegram .ef-cta-section,
body.ef-app-mode.ef-app-hide-footer .ef-footer {
	display: none !important;
}

body.ef-app-mode.ef-app-hide-search #ef-search-toggle,
body.ef-app-mode.ef-app-hide-grades .ef-header__grades-wrap {
	display: none !important;
}

/* Notification bell */
.ef-app-notify {
	position: relative;
}

.ef-app-notify__btn {
	position: relative;
	width: 44px;
	height: 44px;
	min-width: 44px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, .22);
	border-radius: 10px;
	background: rgba(255, 255, 255, .1);
	color: #fff;
	cursor: pointer;
}

.ef-app-notify__btn svg {
	width: 20px;
	height: 20px;
}

.ef-app-notify__count {
	position: absolute;
	top: -4px;
	inset-inline-end: -4px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: #ef4444;
	color: #fff;
	font-size: 10px;
	line-height: 18px;
	text-align: center;
}

.ef-app-notify__panel {
	position: absolute;
	top: calc(100% + 10px);
	inset-inline-end: 0;
	z-index: 80;
	width: min(340px, calc(100vw - 24px));
	max-height: 60vh;
	overflow: auto;
	background: #fff;
	color: #0f172a;
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	box-shadow: 0 22px 48px -24px rgba(15, 23, 42, .55);
	padding: 8px;
}

.ef-app-notify__panel[hidden] {
	display: none;
}

.ef-app-notify__title {
	margin: 6px 8px 10px;
	font-size: 14px;
	font-weight: 800;
	color: #1e3a8a;
}

.ef-app-notify__item {
	display: block;
	padding: 12px 10px;
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	border-bottom: 1px solid #f1f5f9;
}

.ef-app-notify__item:hover,
.ef-app-notify__item:focus {
	background: #eff6ff;
}

.ef-app-notify__item strong {
	display: block;
	font-size: 14px;
	margin-bottom: 4px;
}

.ef-app-notify__item span {
	display: block;
	font-size: 12.5px;
	color: #64748b;
	line-height: 1.7;
}

.ef-app-notify__item small {
	display: block;
	margin-top: 4px;
	color: #94a3b8;
	font-size: 11px;
}

.ef-app-notify__empty {
	padding: 16px 10px;
	color: #64748b;
	font-size: 13px;
	text-align: center;
}

@media (max-width: 600px) {
	.ef-app-notify__panel {
		inset-inline: auto;
		inset-inline-end: -4px;
	}
}

/* Site-wide visibility controls from «عرض المحتوى». */
body.ef-hide-prev-next .ef-nav-links,
body.ef-hide-prev-next .ef-post-navigation,
body.ef-hide-share .ef-share-wrap,
body.ef-hide-related .ef-related,
body.ef-hide-sidebar .ef-sidebar,
body.ef-hide-popular .ef-popular-section,
body.ef-hide-latest .ef-home-latest,
body.ef-hide-tags .ef-tags {
	display: none !important;
}

body.ef-app-mode.ef-app-only-grades .ef-hero,
body.ef-app-mode.ef-app-only-grades .ef-home-ad,
body.ef-app-mode.ef-app-only-grades .ef-home-latest,
body.ef-app-mode.ef-app-only-grades .ef-popular-section,
body.ef-app-mode.ef-app-only-grades .ef-cta-section,
body.ef-app-mode.ef-app-only-grades .ef-content,
body.ef-app-mode.ef-app-only-grades .ef-related {
	display: none !important;
}

/* Shared modal / banner shell */
.ef-app-modal {
	position: fixed;
	inset: 0;
	z-index: 200;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: rgba(15, 23, 42, .45);
	padding: 16px;
}

.ef-app-modal[hidden] {
	display: none;
}

.ef-app-modal__card {
	width: min(440px, 100%);
	background: #fff;
	border-radius: 20px;
	padding: 24px;
	box-shadow: 0 24px 60px -20px rgba(15, 23, 42, .6);
	text-align: right;
	animation: ef-app-rise .25s ease-out;
}

@keyframes ef-app-rise {
	from { transform: translateY(24px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.ef-app-modal__head {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 12px;
}

.ef-app-modal__head img {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	flex: none;
}

.ef-app-modal__head h3 {
	margin: 0;
	font-size: 17px;
	color: #1e3a8a;
	line-height: 1.5;
}

.ef-app-modal__text {
	margin: 0 0 16px;
	color: #64748b;
	font-size: 13.5px;
	line-height: 1.8;
}

.ef-app-modal__field {
	margin-bottom: 12px;
}

.ef-app-modal__field label {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
	margin-bottom: 6px;
	color: #334155;
}

.ef-app-modal__field input[type="email"] {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	font: inherit;
	direction: ltr;
	text-align: right;
}

.ef-app-modal__radios {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 18px;
	font-size: 13px;
}

.ef-app-modal__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.ef-app-btn {
	flex: 1;
	min-width: 120px;
	padding: 12px 18px;
	border: 0;
	border-radius: 10px;
	font: inherit;
	font-weight: 800;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
}

.ef-app-btn--primary {
	background: #1e3a8a;
	color: #fff;
}

.ef-app-btn--ghost {
	background: #f1f5f9;
	color: #475569;
}

.ef-app-modal__status {
	margin-top: 10px;
	font-size: 12.5px;
	min-height: 18px;
	color: #059669;
}

/* Elegant app-download banner */
.ef-app-download {
	position: fixed;
	inset-inline: 12px;
	bottom: 12px;
	z-index: 190;
	display: flex;
	align-items: center;
	gap: 14px;
	max-width: 520px;
	margin-inline: auto;
	padding: 14px 16px;
	background: linear-gradient(135deg, #1e3a8a, #2563eb);
	color: #fff;
	border-radius: 16px;
	box-shadow: 0 18px 40px -18px rgba(30, 58, 138, .8);
	animation: ef-app-rise .25s ease-out;
}

.ef-app-download[hidden] {
	display: none;
}

.ef-app-download img {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	flex: none;
}

.ef-app-download__text {
	flex: 1;
	min-width: 0;
}

.ef-app-download__text strong {
	display: block;
	font-size: 14px;
	margin-bottom: 3px;
}

.ef-app-download__text span {
	display: block;
	font-size: 12px;
	opacity: .88;
	line-height: 1.6;
}

.ef-app-download__actions {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.ef-app-download__install {
	display: inline-block;
	background: #fff;
	color: #1e3a8a;
	border-radius: 10px;
	padding: 9px 14px;
	font-size: 12.5px;
	font-weight: 800;
	text-decoration: none;
	white-space: nowrap;
}

.ef-app-download__close {
	background: none;
	border: 0;
	color: #fff;
	cursor: pointer;
	font-size: 12px;
	opacity: .85;
}
