/**
 * مجتمع جنوب — غرفة الدردشة الحية (ليلي افتراضي + نهاري عبر html.dark).
 * يتبع تبديل الموقع: html.dark = ليلي، html:not(.dark) = نهاري (الحية فقط — لا سرايا).
 *
 * @package Janoob
 */

/* ── متغيرات: ليلي (افتراضي) ── */
.janoob-south-chat-page {
	--jsc-color-text: #f8f4f0;
	--jsc-color-text-muted: rgba(255, 255, 255, 0.65);
	--jsc-color-text-soft: rgba(255, 255, 255, 0.72);
	--jsc-color-text-faint: rgba(255, 255, 255, 0.5);
	--jsc-color-accent-gold: #f5d78e;
	--jsc-color-accent-gold-hover: #fff;
	--jsc-color-promo-link: #fde68a;
	--jsc-color-link: #93c5fd;
	--jsc-color-badge-bg: rgba(227, 0, 15, 0.25);
	--jsc-color-badge-text: #ffc8cd;
	--jsc-page-bg:
		radial-gradient(ellipse 80% 50% at 50% -10%, rgba(227, 0, 15, 0.35), transparent 55%),
		linear-gradient(180deg, #12080a 0%, #1a0c10 45%, #0d0608 100%);
	--jsc-panel-bg: rgba(0, 0, 0, 0.28);
	--jsc-panel-border: rgba(255, 255, 255, 0.06);
	--jsc-promo-bg: linear-gradient(135deg, rgba(227, 0, 15, 0.2), rgba(212, 175, 55, 0.12));
	--jsc-promo-border: rgba(255, 255, 255, 0.08);
	--jsc-pin-bg: rgba(227, 0, 15, 0.15);
	--jsc-pin-border: rgba(227, 0, 15, 0.35);
	--jsc-pin-close: #fff;
	--jsc-quick-bg: rgba(0, 0, 0, 0.25);
	--jsc-quick-border: rgba(255, 255, 255, 0.15);
	--jsc-quick-hover-bg: rgba(227, 0, 15, 0.2);
	--jsc-bubble-bg: rgba(255, 255, 255, 0.1);
	--jsc-bubble-staff-bg: rgba(20, 16, 8, 0.55);
	--jsc-bubble-staff-border: rgba(245, 215, 142, 0.35);
	--jsc-bubble-staff-name: #f5d78e;
	--jsc-bubble-bot-name: #a8b4c4;
	--jsc-empty-color: rgba(255, 255, 255, 0.72);
	--jsc-empty-border: rgba(227, 0, 15, 0.35);
	--jsc-empty-bg: rgba(227, 0, 15, 0.08);
	--jsc-warn-bg: rgba(234, 179, 8, 0.18);
	--jsc-warn-border: rgba(234, 179, 8, 0.35);
	--jsc-warn-text: #fde68a;
	--jsc-warn-muted-bg: rgba(227, 0, 15, 0.22);
	--jsc-warn-muted-border: rgba(227, 0, 15, 0.45);
	--jsc-warn-muted-text: #fecaca;
	--jsc-composer-bg: linear-gradient(180deg, rgba(13, 6, 8, 0) 0%, rgba(13, 6, 8, 0.92) 35%, rgba(13, 6, 8, 0.98) 100%);
	--jsc-composer-shadow: 0 -10px 28px rgba(0, 0, 0, 0.35);
	--jsc-input-bg: rgba(0, 0, 0, 0.45);
	--jsc-input-border: rgba(227, 0, 15, 0.45);
	--jsc-input-text: #fff;
	--jsc-input-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 8px 24px rgba(227, 0, 15, 0.12);
	--jsc-modal-backdrop: rgba(0, 0, 0, 0.65);
	--jsc-modal-panel-bg: #1a1214;
	--jsc-modal-panel-border: rgba(255, 255, 255, 0.1);
	--jsc-theme-toggle-bg: rgba(255, 255, 255, 0.08);
	--jsc-theme-toggle-border: rgba(255, 255, 255, 0.18);
	--jsc-theme-toggle-color: #f8f4f0;
	color-scheme: dark;
}

/* ── نهاري: الحية فقط (لا يغيّر وضع سرايا) ── */
html:not(.dark) .janoob-south-chat-page:not(:has(.jsc-shell--saraya)) {
	--jsc-color-text: #0f172a;
	--jsc-color-text-muted: #64748b;
	--jsc-color-text-soft: #475569;
	--jsc-color-text-faint: #94a3b8;
	--jsc-color-accent-gold: #b45309;
	--jsc-color-accent-gold-hover: #e3000f;
	--jsc-color-promo-link: #c4000d;
	--jsc-color-link: #1d4ed8;
	--jsc-color-badge-bg: rgba(227, 0, 15, 0.1);
	--jsc-color-badge-text: #b91c1c;
	--jsc-page-bg:
		radial-gradient(ellipse 80% 50% at 50% -10%, rgba(227, 0, 15, 0.08), transparent 55%),
		linear-gradient(180deg, #f8fafc 0%, #fffdf8 45%, #f1f5f9 100%);
	--jsc-panel-bg: #ffffff;
	--jsc-panel-border: #e2e8f0;
	--jsc-promo-bg: linear-gradient(135deg, rgba(227, 0, 15, 0.08), rgba(251, 191, 36, 0.12));
	--jsc-promo-border: rgba(227, 0, 15, 0.18);
	--jsc-pin-bg: rgba(227, 0, 15, 0.06);
	--jsc-pin-border: rgba(227, 0, 15, 0.22);
	--jsc-pin-close: #64748b;
	--jsc-quick-bg: #ffffff;
	--jsc-quick-border: #cbd5e1;
	--jsc-quick-hover-bg: rgba(227, 0, 15, 0.08);
	--jsc-bubble-bg: #f1f5f9;
	--jsc-bubble-staff-bg: #fff7ed;
	--jsc-bubble-staff-border: rgba(245, 158, 11, 0.45);
	--jsc-bubble-staff-name: #b45309;
	--jsc-bubble-bot-name: #64748b;
	--jsc-empty-color: #475569;
	--jsc-empty-border: rgba(227, 0, 15, 0.28);
	--jsc-empty-bg: rgba(227, 0, 15, 0.05);
	--jsc-warn-bg: #fef9c3;
	--jsc-warn-border: #facc15;
	--jsc-warn-text: #854d0e;
	--jsc-warn-muted-bg: #fee2e2;
	--jsc-warn-muted-border: #fca5a5;
	--jsc-warn-muted-text: #b91c1c;
	--jsc-composer-bg: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, rgba(241, 245, 249, 0.92) 35%, #f1f5f9 100%);
	--jsc-composer-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
	--jsc-input-bg: #ffffff;
	--jsc-input-border: #cbd5e1;
	--jsc-input-text: #0f172a;
	--jsc-input-shadow: 0 0 0 1px rgba(15, 23, 42, 0.04), 0 4px 16px rgba(227, 0, 15, 0.08);
	--jsc-modal-backdrop: rgba(15, 23, 42, 0.45);
	--jsc-modal-panel-bg: #ffffff;
	--jsc-modal-panel-border: #e2e8f0;
	--jsc-theme-toggle-bg: #ffffff;
	--jsc-theme-toggle-border: #cbd5e1;
	--jsc-theme-toggle-color: #0f172a;
	color-scheme: light;
}

/* unified color: is-mine uses same text color as others — no forced white */
html:not(.dark) .jsc-shell:not(.jsc-shell--saraya) {
	--jsc-bubble-mine-bg: rgba(100, 116, 139, 0.12);
}
.dark .jsc-shell:not(.jsc-shell--saraya) {
	--jsc-bubble-mine-bg: rgba(148, 163, 184, 0.16);
}

/* غلاف الصفحة */
body.janoob-south-chat-shell {
	overflow: hidden;
	height: 100dvh;
}

body.janoob-south-chat-shell .janoob-site-footer {
	display: none !important;
}

body.janoob-south-chat-shell .janoob-portal-dock-header,
body.janoob-south-chat-shell .janoob-masthead,
body.janoob-south-chat-shell .janoob-hub-minimal-layout > .janoob-portal-dock-header {
	display: none !important;
}

body.janoob-south-chat-shell .janoob-layout-scroll {
	display: flex;
	flex-direction: column;
	min-height: 100dvh;
	height: 100dvh;
	overflow: hidden;
	padding-top: 0 !important;
}

body.janoob-south-chat-shell #janoob-sticky-ad-bar {
	display: none !important;
}

.janoob-south-chat-page {
	flex: 1 1 auto;
	min-height: 0;
	width: 100%;
	background: var(--jsc-page-bg);
	font-family: 'Cairo', 'Noto Kufi Arabic', 'Tahoma', sans-serif;
	font-size: 0.9rem;
	color: var(--jsc-color-text);
}

.jsc-shell {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	height: 100%;
	min-height: 0;
	padding: env(safe-area-inset-top, 0) 0.5rem 0;
	box-sizing: border-box;
}

.jsc-topbar {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.35rem 0.5rem;
	padding: 0.5rem 0.15rem 0.35rem;
	flex-shrink: 0;
}

.jsc-back-link {
	grid-column: 1;
	font-size: 0.72rem;
	font-weight: 800;
	color: var(--jsc-color-accent-gold);
	text-decoration: none;
	white-space: nowrap;
}

.jsc-back-link:hover {
	color: var(--jsc-color-accent-gold-hover);
}

.jsc-topbar__brand {
	grid-column: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	flex-wrap: wrap;
}

.jsc-topbar__meta {
	grid-column: 3;
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0.35rem;
	text-align: left;
}

.jsc-theme-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	padding: 0;
	border-radius: 10px;
	border: 1px solid var(--jsc-theme-toggle-border);
	background: var(--jsc-theme-toggle-bg);
	color: var(--jsc-theme-toggle-color);
	cursor: pointer;
	flex-shrink: 0;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.jsc-theme-toggle:hover {
	border-color: rgba(227, 0, 15, 0.45);
}

.jsc-theme-toggle svg {
	width: 1.05rem;
	height: 1.05rem;
}

html.dark .jsc-theme-toggle .jsc-theme-icon-moon {
	display: none;
}

html.dark .jsc-theme-toggle .jsc-theme-icon-sun {
	display: block;
}

html:not(.dark) .jsc-theme-toggle .jsc-theme-icon-moon {
	display: block;
}

html:not(.dark) .jsc-theme-toggle .jsc-theme-icon-sun {
	display: none;
}

.jsc-smart-share .jsc-smart-share-icon {
	width: 1.05rem;
	height: 1.05rem;
	display: block;
}

.jsc-live-dot {
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 12px #22c55e;
	animation: jsc-pulse 1.6s ease-in-out infinite;
}

@keyframes jsc-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.55; transform: scale(0.85); }
}

.jsc-topbar__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 900;
	color: var(--jsc-color-text);
}

.jsc-topbar__badge {
	font-size: 0.62rem;
	font-weight: 800;
	padding: 0.12rem 0.4rem;
	border-radius: 999px;
	background: var(--jsc-color-badge-bg);
	color: var(--jsc-color-badge-text);
}

.jsc-online {
	font-size: 0.68rem;
	font-weight: 800;
	color: var(--jsc-color-text-muted);
	white-space: nowrap;
}

.jsc-promo {
	margin-bottom: 0.4rem;
	border-radius: 14px;
	background: var(--jsc-promo-bg);
	border: 1px solid var(--jsc-promo-border);
	overflow: hidden;
	flex-shrink: 0;
}

.jsc-promo__inner {
	display: flex;
	align-items: flex-start;
	gap: 0.65rem;
	padding: 0.65rem 0.75rem;
	animation: jsc-promo-in 0.45s ease;
}

@keyframes jsc-promo-in {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: translateY(0); }
}

.jsc-promo__icon {
	font-size: 1.45rem;
	line-height: 1;
	flex-shrink: 0;
}

.jsc-promo__text strong {
	display: block;
	font-size: 0.85rem;
	font-weight: 800;
	color: var(--jsc-color-text);
}

.jsc-promo__text p {
	margin: 0.15rem 0 0;
	font-size: 0.74rem;
	color: var(--jsc-color-text-soft);
}

.jsc-promo__inner.is-clickable {
	cursor: pointer;
}

.jsc-promo__title-link {
	color: var(--jsc-color-promo-link);
	text-decoration: underline;
	font-weight: 900;
}

.jsc-promo__title-link:hover {
	color: var(--jsc-color-accent-gold-hover);
}

.jsc-promo__link {
	display: inline-block;
	margin-top: 0.25rem;
	font-size: 0.72rem;
	font-weight: 800;
	color: var(--jsc-color-accent-gold);
	text-decoration: none;
}

.jsc-promo__link:hover {
	text-decoration: underline;
	color: var(--jsc-color-accent-gold-hover);
}

.jsc-pin {
	position: relative;
	flex-shrink: 0;
	margin-bottom: 0.35rem;
	padding: 0.5rem 2rem 0.5rem 0.65rem;
	border-radius: 12px;
	background: var(--jsc-pin-bg);
	border: 1px solid var(--jsc-pin-border);
	font-size: 0.72rem;
	line-height: 1.45;
	color: var(--jsc-color-text);
}

.jsc-pin p {
	margin: 0;
}

.jsc-pin__close {
	position: absolute;
	top: 0.35rem;
	left: 0.4rem;
	border: none;
	background: transparent;
	color: var(--jsc-pin-close);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0.8;
}

.jsc-typing {
	flex-shrink: 0;
	margin: 0.25rem 0.5rem 0;
	font-size: 0.68rem;
	font-weight: 800;
	color: var(--jsc-color-accent-gold);
	font-style: italic;
}

.jsc-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	padding: 0.25rem 0.1rem 0.35rem;
	flex-shrink: 0;
}

.jsc-quick__btn {
	border: 1px solid var(--jsc-quick-border);
	border-radius: 999px;
	padding: 0.28rem 0.65rem;
	background: var(--jsc-quick-bg);
	color: var(--jsc-color-text);
	font-family: inherit;
	font-size: 0.72rem;
	font-weight: 800;
	cursor: pointer;
}

.jsc-quick__btn:hover {
	border-color: rgba(227, 0, 15, 0.5);
	background: var(--jsc-quick-hover-bg);
}

.jsc-messages-wrap {
	flex: 1 1 auto;
	min-height: 0;
	overflow: hidden;
	border-radius: 16px;
	background: var(--jsc-panel-bg);
	border: 1px solid var(--jsc-panel-border);
	display: flex;
	flex-direction: column;
}

html:not(.dark) .jsc-shell:not(.jsc-shell--saraya) .jsc-messages-wrap {
	box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.jsc-messages-panel {
	display: none;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
	overflow: hidden;
}

.jsc-messages-panel--live {
	display: flex;
}

.jsc-shell--saraya .jsc-messages-panel--live {
	display: none !important;
}

.jsc-shell--saraya .jsc-messages-panel--saraya {
	display: flex !important;
}

.jsc-messages {
	height: 100%;
	max-height: none;
	overflow-y: auto;
	padding: 0.5rem 0.6rem;
	display: flex;
	flex-direction: column;
	gap: 0.22rem;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
}

.jsc-empty-hint {
	margin: auto 0.5rem;
	padding: 1rem 0.85rem;
	text-align: center;
	font-size: 0.92rem;
	line-height: 1.55;
	color: var(--jsc-empty-color);
	border: 1px dashed var(--jsc-empty-border);
	border-radius: 12px;
	background: var(--jsc-empty-bg);
	animation: jsc-empty-pulse 2.4s ease-in-out infinite;
}

@keyframes jsc-empty-pulse {
	0%,
	100% {
		opacity: 0.85;
	}
	50% {
		opacity: 1;
	}
}

.jsc-bubble {
	position: relative;
	max-width: 92%;
	align-self: flex-start;
	padding: 0.3rem 0.55rem;
	border-radius: 10px 10px 10px 3px;
	background: var(--jsc-bubble-bg);
	color: var(--jsc-color-text);
	animation: jsc-bubble-in 0.2s ease;
}

.jsc-bubble.is-revealing {
	animation: none;
}

.jsc-bubble__body--chunked {
	min-height: 1.2em;
}

.jsc-bubble__chunk {
	display: inline;
	animation: jsc-chunk-in 0.18s ease;
}

@keyframes jsc-chunk-in {
	from {
		opacity: 0;
		transform: translateY(5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.jsc-bubble.is-mine {
	align-self: flex-start;
	background: var(--jsc-bubble-mine-bg, rgba(100, 116, 139, 0.18));
	border-radius: 10px 10px 10px 3px;
	color: var(--jsc-color-text);
}

.jsc-bubble.is-staff {
	border: 1px solid var(--jsc-bubble-staff-border);
	background: var(--jsc-bubble-staff-bg);
}

.jsc-bubble.is-staff .jsc-bubble__name,
.jsc-bubble.is-community-bot .jsc-bubble__name {
	color: var(--jsc-color-text-faint, #64748b);
	opacity: 0.8;
}

.jsc-bubble__body a {
	color: var(--jsc-color-link);
	text-decoration: underline;
	word-break: break-all;
}

.jsc-bubble__body .jsc-wa-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	margin-inline-start: 0.35rem;
	padding: 0.2rem;
	border-radius: 999px;
	color: #25d366;
	text-decoration: none;
	word-break: normal;
	background: rgba(37, 211, 102, 0.12);
	border: 1px solid rgba(37, 211, 102, 0.35);
	transition: background 0.15s ease, transform 0.15s ease;
}

.jsc-bubble__body .jsc-wa-link:hover {
	background: rgba(37, 211, 102, 0.22);
	transform: scale(1.06);
}

.jsc-wa-link__icon {
	width: 1.25rem;
	height: 1.25rem;
	display: block;
}

@keyframes jsc-bubble-in {
	from { opacity: 0; transform: translateY(8px) scale(0.98); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}

.jsc-bubble__meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.35rem;
	margin-bottom: 0.05rem;
}

.jsc-bubble__name {
	font-size: 0.6rem;
	font-weight: 700;
	opacity: 0.75;
	color: var(--jsc-color-text-faint, #64748b);
	flex: 1 1 auto;
	min-width: 0;
}

.jsc-bubble__time {
	font-size: 0.57rem;
	font-weight: 600;
	opacity: 0.55;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	direction: ltr;
	unicode-bidi: isolate;
}

.jsc-bubble__body {
	margin: 0;
	font-size: 0.78rem;
	line-height: 1.3;
	word-break: break-word;
	overflow-wrap: anywhere;
	white-space: pre-wrap;
	direction: rtl;
	text-align: right;
}

.jsc-warn {
	flex-shrink: 0;
	margin: 0.35rem 0 0;
	padding: 0.45rem 0.65rem;
	border-radius: 10px;
	background: var(--jsc-warn-bg);
	border: 1px solid var(--jsc-warn-border);
	color: var(--jsc-warn-text);
	font-size: 0.72rem;
	font-weight: 800;
	text-align: center;
}

.jsc-warn.is-muted {
	background: var(--jsc-warn-muted-bg);
	border-color: var(--jsc-warn-muted-border);
	color: var(--jsc-warn-muted-text);
}

.jsc-composer {
	flex-shrink: 0;
	padding: 0.5rem 0.1rem calc(0.35rem + env(safe-area-inset-bottom, 0px));
	background: var(--jsc-composer-bg);
	box-shadow: var(--jsc-composer-shadow);
}

.jsc-composer__identity {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.3rem;
	font-size: 0.72rem;
	color: var(--jsc-color-text-soft);
	gap: 0.4rem;
	flex-wrap: wrap;
}

.jsc-join-stamp {
	font-size: 0.65rem;
	font-variant-numeric: tabular-nums;
	color: var(--jsc-color-text-faint);
	direction: ltr;
	unicode-bidi: isolate;
	margin-inline-start: auto;
	white-space: nowrap;
}

.jsc-rename-btn {
	border: none;
	background: transparent;
	color: var(--jsc-color-accent-gold);
	font-weight: 800;
	font-family: inherit;
	cursor: pointer;
	text-decoration: underline;
}

.jsc-name {
	font-weight: 900;
	color: var(--jsc-color-text);
}

.jsc-composer__row {
	display: flex;
	gap: 0.45rem;
	align-items: stretch;
}

.jsc-input {
	flex: 1;
	min-height: 48px;
	border-radius: 14px;
	border: 2px solid var(--jsc-input-border);
	background: var(--jsc-input-bg);
	color: var(--jsc-input-text);
	padding: 0.7rem 0.85rem;
	font-family: inherit;
	font-size: 0.88rem;
	line-height: 1.35;
	box-shadow: var(--jsc-input-shadow);
	direction: rtl;
	text-align: right;
}

.jsc-input::placeholder {
	color: var(--jsc-color-text-faint);
	opacity: 1;
}

.jsc-input:focus {
	outline: none;
	border-color: #e3000f;
	box-shadow: 0 0 0 3px rgba(227, 0, 15, 0.25);
}

.jsc-input:disabled {
	opacity: 0.55;
}

.jsc-send {
	border: none;
	border-radius: 14px;
	min-width: 4.5rem;
	padding: 0 1rem;
	font-weight: 900;
	font-family: inherit;
	font-size: 0.95rem;
	background: #e3000f;
	color: #fff;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.jsc-send:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(227, 0, 15, 0.45);
}

.jsc-send:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.jsc-legal {
	margin: 0.4rem 0 0;
	font-size: 0.62rem;
	color: var(--jsc-color-text-faint);
	text-align: center;
}

.jsc-terms-link {
	border: none;
	background: none;
	color: var(--jsc-color-accent-gold);
	font-family: inherit;
	cursor: pointer;
	text-decoration: underline;
}

/* مودالات الحية (شروط / اسم) — تتبع الثيم */
.jsc-modal[hidden] {
	display: none !important;
}

.jsc-modal {
	position: fixed;
	inset: 0;
	z-index: 200000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
}

.jsc-modal__backdrop {
	position: absolute;
	inset: 0;
	background: var(--jsc-modal-backdrop);
}

.jsc-modal__panel {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 400px;
	background: var(--jsc-modal-panel-bg);
	color: var(--jsc-color-text);
	border-radius: 16px;
	padding: 1.25rem;
	border: 1px solid var(--jsc-modal-panel-border);
}

.jsc-modal__panel h2 {
	color: var(--jsc-color-text);
}

.jsc-terms-list {
	margin: 0 0 1rem;
	padding-right: 1.1rem;
	font-size: 0.85rem;
	line-height: 1.55;
	color: var(--jsc-color-text-soft);
}

.jsc-modal__close {
	width: 100%;
	margin-top: 0.5rem;
	padding: 0.65rem;
	border: none;
	border-radius: 10px;
	background: #e3000f;
	color: #fff;
	font-weight: 900;
	font-family: inherit;
	cursor: pointer;
}

.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

/* مشاركة السطر — أيقونة خفية + تمييز #m-id */
.jsc-share-btn {
	flex: 0 0 auto;
	width: 1.65rem;
	height: 1.65rem;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: var(--jsc-color-text-soft);
	font-size: 0.85rem;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, background 0.15s ease, color 0.15s ease;
}

.jsc-bubble:hover .jsc-share-btn,
.jsc-bubble.is-share-armed .jsc-share-btn,
.jsc-share-btn:focus-visible {
	opacity: 1;
	pointer-events: auto;
}

.jsc-bubble.is-mine .jsc-share-btn {
	background: rgba(0, 0, 0, 0.12);
	color: rgba(255, 255, 255, 0.92);
}

.jsc-share-btn:hover,
.jsc-share-btn:focus-visible {
	background: rgba(227, 0, 15, 0.18);
	color: #e3000f;
}

.jsc-share-menu {
	position: absolute;
	top: 0.15rem;
	left: 0.35rem;
	z-index: 12;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 6.5rem;
	padding: 0.35rem;
	border-radius: 10px;
	background: var(--jsc-color-surface, #1a1f28);
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

html:not(.dark) .jsc-share-menu {
	background: #fff;
	border-color: rgba(15, 23, 42, 0.12);
	box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.jsc-share-menu__btn {
	padding: 0.4rem 0.55rem;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	font-family: inherit;
	font-size: 0.78rem;
	font-weight: 700;
	text-align: right;
	cursor: pointer;
}

.jsc-share-menu__btn:hover {
	background: rgba(227, 0, 15, 0.12);
	color: #e3000f;
}

.jsc-bubble.is-share-highlight {
	outline: 2px solid rgba(227, 0, 15, 0.65);
	outline-offset: 2px;
	animation: jsc-share-highlight 0.6s ease;
}

@keyframes jsc-share-highlight {
	0% {
		box-shadow: 0 0 0 0 rgba(227, 0, 15, 0.45);
	}
	70% {
		box-shadow: 0 0 0 8px rgba(227, 0, 15, 0);
	}
	100% {
		box-shadow: none;
	}
}

/* صفحة لقطة المشاركة */
.jsc-share-page {
	min-height: 60vh;
	padding: 1.25rem 1rem 2.5rem;
	font-family: 'Cairo', system-ui, sans-serif;
}

.jsc-share-page__inner {
	max-width: 520px;
	margin-inline: auto;
}

.jsc-share-page__head {
	margin-bottom: 1.25rem;
}

.jsc-share-page__back {
	display: inline-block;
	margin-bottom: 0.65rem;
	font-size: 0.82rem;
	font-weight: 700;
	color: var(--jsc-color-link, #e3000f);
	text-decoration: none;
}

.jsc-share-page__title {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
	font-weight: 900;
}

.jsc-share-page__note {
	margin: 0;
	font-size: 0.78rem;
	color: var(--jsc-color-text-soft, #94a3b8);
	line-height: 1.5;
}

.jsc-share-page__bubble {
	max-width: 100%;
	margin-bottom: 1rem;
}

.jsc-share-page__empty {
	padding: 1.25rem;
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.06);
	text-align: center;
}

.jsc-share-page__cta {
	display: inline-block;
	margin-top: 0.75rem;
	padding: 0.55rem 1rem;
	border-radius: 10px;
	background: #e3000f;
	color: #fff;
	font-weight: 800;
	text-decoration: none;
}

.jsc-share-page__live {
	text-align: center;
}

@media (prefers-reduced-motion: reduce) {
	.jsc-bubble__chunk {
		animation: none;
	}

	.jsc-bubble.is-revealing {
		animation: jsc-bubble-in 0.2s ease;
	}
}

@media (min-width: 640px) {
	.jsc-shell {
		max-width: 640px;
		margin-inline: auto;
		padding-inline: 0.75rem;
	}
}

/* ─── أزرار "هل تريد ستوري آخر؟" ─── */
.jsc-publish-done-btns {
	display: flex;
	gap: 0.5rem;
	margin-top: 0.6rem;
	flex-wrap: wrap;
	justify-content: flex-end;
}

.jsc-publish-done-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.45rem 1rem;
	border: none;
	border-radius: 20px;
	font-family: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.12s;
	line-height: 1;
}

.jsc-publish-done-btn:active {
	transform: scale(0.96);
}

.jsc-publish-done-btn--yes {
	background: #1a7f37;
	color: #fff;
}

.jsc-publish-done-btn--yes:hover {
	opacity: 0.88;
}

.jsc-publish-done-btn--no {
	background: #555;
	color: #fff;
}

.jsc-publish-done-btn--no:hover {
	opacity: 0.82;
}
