/* IsraelNow Popups — frontend */

/* ===== Overlay ===== */
.inow-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(10, 14, 26, 0.72);
	-webkit-backdrop-filter: blur(3px);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity 0.35s ease;
	direction: rtl;
}
.inow-overlay.is-open {
	opacity: 1;
}
.inow-overlay.is-closing {
	opacity: 0;
	transition: opacity 0.28s ease;
}

/* ===== Modal shell ===== */
.inow-modal {
	position: relative;
	width: -moz-fit-content;
	width: fit-content;
	max-width: min(560px, 94vw);
	transform: translateY(28px) scale(0.92);
	opacity: 0;
	transition: transform 0.55s cubic-bezier(0.19, 1.25, 0.35, 1), opacity 0.4s ease;
}
.inow-overlay.is-open .inow-modal {
	transform: translateY(0) scale(1);
	opacity: 1;
}
.inow-overlay.is-closing .inow-modal {
	transform: translateY(12px) scale(0.94);
	opacity: 0;
	transition: transform 0.28s ease-in, opacity 0.24s ease-in;
}

/* ===== Close button ===== */
.inow-close {
	position: absolute;
	top: -16px;
	right: -14px;
	z-index: 3;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: #fff;
	color: #131a2c;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s ease, color 0.2s ease;
	padding: 0;
	line-height: 0;
}
.inow-close .inow-close-x {
	width: 16px;
	height: 16px;
	display: block;
	position: relative;
	z-index: 2;
}

/* טבעת ספירה לאחור עד הסגירה האוטומטית */
.inow-close-ring {
	position: absolute;
	inset: -3px;
	width: calc(100% + 6px);
	height: calc(100% + 6px);
	fill: none;
	stroke: #f6a821;
	stroke-width: 3;
	stroke-linecap: round;
	stroke-dasharray: 138.2;
	stroke-dashoffset: 0;
	transform: rotate(-90deg);
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
}
.inow-overlay.is-open .inow-close-ring {
	opacity: 1;
	animation: inow-ring 5s linear forwards;
}
.inow-overlay.no-auto .inow-close-ring {
	opacity: 0;
}
@keyframes inow-ring {
	to {
		stroke-dashoffset: 138.2;
	}
}
.inow-close:hover {
	transform: rotate(90deg) scale(1.08);
	background: #131a2c;
	color: #fff;
}
.inow-close:focus-visible {
	outline: 2px solid #f6a821;
	outline-offset: 2px;
}

/* ===== Card base ===== */
.inow-card {
	position: relative;
	overflow: hidden;
	border-radius: 18px;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
	direction: rtl;
	text-align: center;
	font-family: var(--inow-font, 'Heebo', sans-serif);
	width: min(560px, 94vw);
}

/* ===== Image mode ===== */
/* תמונה נכנסת בשלמותה: מוגבלת לגובה המסך, בלי חיתוך */
.inow-tpl-image {
	display: block;
	line-height: 0;
	background: #131a2c;
	width: auto;
}
.inow-tpl-image .inow-image {
	display: block;
	width: auto;
	height: auto;
	max-width: min(560px, 94vw);
	max-height: 80vh;
	margin: 0 auto;
}

/* ===== Shared template pieces ===== */
.inow-bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transform: scale(1.04);
}
.inow-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(13, 18, 33, 0.55) 0%, rgba(13, 18, 33, 0.78) 100%);
}
.inow-content {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	padding: 48px 36px;
	color: #fff;
}
.inow-title {
	margin: 0;
	font-size: var(--inow-title-size, 34px);
	font-weight: 800;
	line-height: 1.2;
	color: #fff;
	font-family: inherit;
}
.inow-subtitle {
	margin: 0;
	font-size: calc(var(--inow-title-size, 34px) * 0.62);
	font-weight: 600;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.92);
}
.inow-highlight {
	margin: 6px 0 2px;
	font-size: var(--inow-highlight-size, 52px);
	font-weight: 900;
	line-height: 1.1;
	letter-spacing: 0.5px;
	color: var(--inow-accent, #f6a821);
	text-decoration: none;
	unicode-bidi: plaintext;
}
a.inow-highlight:hover {
	filter: brightness(1.12);
}
.inow-btn {
	margin-top: 12px;
	display: inline-block;
	padding: 13px 38px;
	border-radius: 999px;
	background: var(--inow-accent, #f6a821);
	color: #131a2c;
	font-size: 18px;
	font-weight: 800;
	text-decoration: none;
	font-family: inherit;
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, filter 0.2s ease;
}
.inow-btn:hover {
	transform: translateY(-2px);
	filter: brightness(1.06);
	color: #131a2c;
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.38);
}

/* ===== Template: Spotlight ===== */
.inow-tpl-spotlight {
	background: #131a2c;
	min-height: 340px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ===== Template: Banner ===== */
.inow-tpl-banner {
	background: #fff;
}
.inow-tpl-banner .inow-bg {
	position: relative;
	inset: auto;
	height: 220px;
	transform: none;
}
.inow-tpl-banner .inow-shade {
	height: 220px;
	inset: 0 0 auto 0;
	background: linear-gradient(180deg, rgba(13, 18, 33, 0) 40%, rgba(255, 255, 255, 1) 100%);
}
.inow-tpl-banner .inow-content {
	color: #131a2c;
	padding: 10px 36px 42px;
}
.inow-tpl-banner .inow-title {
	color: #131a2c;
}
.inow-tpl-banner .inow-subtitle {
	color: #4a5265;
}

/* ===== Template: Clean ===== */
.inow-tpl-clean {
	background: #131a2c;
}
.inow-tpl-clean .inow-content {
	padding: 56px 40px;
}
.inow-tpl-clean .inow-title {
	color: var(--inow-accent, #f6a821);
}
.inow-tpl-clean .inow-highlight {
	color: #fff;
}
.inow-tpl-clean .inow-btn {
	background: transparent;
	border: 2px solid var(--inow-accent, #f6a821);
	color: #fff;
	box-shadow: none;
}
.inow-tpl-clean .inow-btn:hover {
	background: var(--inow-accent, #f6a821);
	color: #131a2c;
}

/* ===== Mobile ===== */
@media (max-width: 480px) {
	.inow-overlay {
		padding: 14px;
	}
	.inow-close {
		top: -12px;
		right: -6px;
		width: 38px;
		height: 38px;
	}
	.inow-content {
		padding: 36px 22px;
		gap: 8px;
	}
	.inow-title {
		font-size: clamp(20px, 6.5vw, var(--inow-title-size, 34px));
	}
	.inow-highlight {
		font-size: clamp(28px, 11vw, var(--inow-highlight-size, 52px));
	}
	.inow-tpl-banner .inow-bg,
	.inow-tpl-banner .inow-shade {
		height: 160px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.inow-overlay,
	.inow-modal,
	.inow-close,
	.inow-btn {
		transition: none !important;
	}
	.inow-close-ring {
		animation: none !important;
		opacity: 0 !important;
	}
}
