/* Tarhal Newsletter Popup — styles
 * Deep green / sand / terracotta, Damascene lattice band, RTL-safe logical properties.
 * Desktop: centered modal. Mobile: bottom sheet.
 */

.tnp-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(24, 33, 26, 0.55);
	backdrop-filter: blur(3px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	transition: opacity 0.25s ease;
	/* Author styles beat the UA [hidden] rule, so display:flex above would keep
	   this full-screen layer alive and swallow every click on the page.
	   These two rules are what actually take it out of the way. */
	pointer-events: none;
}
.tnp-overlay[hidden] { display: none !important; }
.tnp-overlay.is-open { opacity: 1; pointer-events: auto; }
body.tnp-lock { overflow: hidden; }

.tnp-modal {
	position: relative;
	width: 100%;
	max-width: 440px;
	background: #f8f4ea;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 24px 70px rgba(15, 25, 18, 0.45);
	transform: translateY(18px) scale(0.97);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
	font-family: 'Tajawal', inherit, sans-serif;
	color: #22271f;
	line-height: 1.8;
}
.tnp-overlay.is-open .tnp-modal { transform: translateY(0) scale(1); }
.tnp-modal *, .tnp-modal *::before, .tnp-modal *::after { box-sizing: border-box; }

/* Damascene lattice band (inline SVG pattern, no external requests) */
.tnp-band {
	background-color: #1f3d2b;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cg fill='none' stroke='%23efe7d3' stroke-opacity='0.14'%3E%3Crect x='11' y='11' width='22' height='22' transform='rotate(45 22 22)'/%3E%3Crect x='17.5' y='17.5' width='9' height='9' transform='rotate(45 22 22)'/%3E%3C/g%3E%3C/svg%3E");
	padding: 30px 24px 24px;
	text-align: center;
	position: relative;
}
.tnp-star {
	display: block;
	font-size: 2rem;
	color: #c4663b;
	text-shadow: 0 0 22px rgba(196, 102, 59, 0.55);
	margin-block-end: 4px;
}
.tnp-band-kicker {
	color: #efe7d3;
	font-weight: 700;
	font-size: 0.82rem;
	letter-spacing: 2px;
}

.tnp-close {
	position: absolute;
	inset-block-start: 10px;
	inset-inline-end: 12px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: rgba(239, 231, 211, 0.16);
	color: #efe7d3;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	transition: background 0.15s;
}
.tnp-close:hover { background: rgba(239, 231, 211, 0.32); }

.tnp-body { padding: 22px 26px 26px; text-align: center; }
.tnp-title {
	margin: 0 0 8px;
	font-size: 1.32rem;
	font-weight: 800;
	color: #1f3d2b;
	line-height: 1.55;
}
.tnp-text { margin: 0 0 16px; color: #5a604f; font-size: 0.97rem; }

.tnp-input {
	width: 100%;
	font-family: inherit;
	font-size: 1rem;
	padding: 12px 16px;
	margin-block-end: 10px;
	border: 1.5px solid #d9d0ba;
	border-radius: 12px;
	background: #fff;
	color: #22271f;
}
.tnp-input::placeholder { color: #9aa08d; }
.tnp-input:focus, .tnp-btn:focus-visible, .tnp-close:focus-visible {
	outline: 3px solid rgba(196, 102, 59, 0.45);
	outline-offset: 2px;
}
#tnp-email { direction: ltr; text-align: center; }

/* Honeypot: visually removed, still in the DOM for bots */
.tnp-hp {
	position: absolute;
	inset-inline-start: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.tnp-btn {
	width: 100%;
	font-family: inherit;
	font-size: 1.05rem;
	font-weight: 800;
	padding: 13px 20px;
	border: none;
	border-radius: 999px;
	background: #c4663b;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 8px 20px rgba(196, 102, 59, 0.4);
	transition: background 0.18s, transform 0.12s;
}
.tnp-btn:hover { background: #ad5730; }
.tnp-btn:active { transform: scale(0.985); }
.tnp-btn:disabled { opacity: 0.65; cursor: wait; box-shadow: none; }

.tnp-error {
	margin: 12px 0 0;
	background: #fbe9e2;
	border: 1px solid #c4663b;
	color: #8a3d1c;
	border-radius: 10px;
	padding: 8px 14px;
	font-size: 0.88rem;
	font-weight: 600;
}
.tnp-consent { margin: 14px 0 0; color: #8a8f7d; font-size: 0.8rem; }

.tnp-success { padding: 8px 0 4px; }
.tnp-success-mark {
	display: inline-block;
	font-size: 1.7rem;
	color: #c4663b;
	width: 64px;
	height: 64px;
	line-height: 64px;
	background: #f3e2d7;
	border-radius: 50%;
	margin-block-end: 10px;
}
.tnp-success-title { margin: 0 0 6px; color: #1f3d2b; font-size: 1.25rem; font-weight: 800; }

/* Mobile: bottom sheet */
@media (max-width: 560px) {
	.tnp-overlay { padding: 0; align-items: flex-end; }
	.tnp-modal {
		max-width: none;
		border-radius: 22px 22px 0 0;
		transform: translateY(100%);
	}
	.tnp-overlay.is-open .tnp-modal { transform: translateY(0); }
	.tnp-band { padding: 24px 20px 18px; }
	.tnp-body { padding: 18px 20px calc(22px + env(safe-area-inset-bottom)); }
	.tnp-title { font-size: 1.18rem; }
}

@media (prefers-reduced-motion: reduce) {
	.tnp-overlay, .tnp-modal, .tnp-btn { transition: none; }
}
