/**
 * Tanova Popups — branded overlay
 * Sits below Access age/cookies (100010 / 100005) and PWA chrome (100050).
 */

.tnp-root[hidden],
.tnp[hidden] {
	display: none !important;
}

.tnp {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
	font-family: var(--tn-font, "Outfit", system-ui, sans-serif);
	color: var(--tn-accent, #f5f0e6);
	box-sizing: border-box;
}

.tnp--sheet {
	align-items: flex-end;
}

.tnp__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, var(--tnp-overlay, 0.72));
}

.tnp__panel {
	position: relative;
	z-index: 1;
	width: min(520px, 100%);
	max-height: min(90vh, 760px);
	overflow: auto;
	background: var(--tn-black, #0a0a0a);
	color: var(--tn-accent, #f5f0e6);
	border: 1px solid var(--tn-line, rgba(255, 255, 255, 0.12));
	border-radius: var(--tn-radius, 12px);
	box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
	-webkit-overflow-scrolling: touch;
}

.tnp--sheet .tnp__panel {
	width: min(560px, 100%);
	border-radius: 16px 16px 0 0;
	max-height: min(86vh, 680px);
}

.tnp--media-left .tnp__panel {
	width: min(720px, 100%);
	display: grid;
	grid-template-columns: 0.9fr 1.1fr;
}

.tnp--media-bg .tnp__panel {
	background-color: #0a0a0a;
	background-size: cover;
	background-position: center;
}

.tnp--media-bg .tnp__body {
	background: linear-gradient(180deg, rgba(10, 10, 10, 0.45) 0%, rgba(10, 10, 10, 0.88) 40%, #0a0a0a 100%);
}

.tnp__media {
	min-height: 160px;
	background: #121212;
}

.tnp__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	max-height: 240px;
}

.tnp--media-left .tnp__media img {
	max-height: none;
	min-height: 100%;
}

.tnp__body {
	padding: 22px 22px 24px;
	box-sizing: border-box;
}

.tnp__close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 8px;
	background: rgba(10, 10, 10, 0.55);
	color: #f5f0e6;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

.tnp__close:hover,
.tnp__close:focus {
	background: rgba(245, 240, 230, 0.16);
	outline: none;
}

.tnp__kicker {
	margin: 0 0 8px;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	opacity: 0.7;
}

.tnp__heading {
	margin: 0 0 10px;
	font-family: var(--tn-display, "Outfit", system-ui, sans-serif);
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.15;
	text-transform: uppercase;
	color: inherit;
}

.tnp__text {
	margin: 0 0 18px;
	font-size: 1rem;
	line-height: 1.55;
	opacity: 0.92;
	color: #fff;
}

.tnp__text p {
	margin: 0 0 0.7em;
}

.tnp__text p:last-child {
	margin-bottom: 0;
}

.tnp__form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 0 0 14px;
}

.tnp__hp {
	position: absolute;
	left: -9999px;
	opacity: 0;
	height: 0;
	width: 0;
}

.tnp__email {
	width: 100%;
	box-sizing: border-box;
	padding: 13px 14px;
	border-radius: 8px;
	border: 1px solid rgba(245, 240, 230, 0.28);
	background: #121212;
	color: #fff;
	font: inherit;
	font-size: 16px;
}

.tnp__email:focus {
	outline: 2px solid var(--tn-accent, #f5f0e6);
	outline-offset: 1px;
}

.tnp__consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: #d8d2c6;
	font-weight: 400;
}

.tnp__consent input {
	margin-top: 3px;
}

.tnp__note {
	margin: 0;
	font-size: 12px;
	line-height: 1.45;
	opacity: 0.7;
}

.tnp__note a {
	color: inherit;
	text-decoration: underline;
}

.tnp__err {
	margin: 0;
	font-size: 13px;
	color: #f0a8a8;
}

.tnp__actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tnp__cta,
.tnp__submit {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 14px 18px;
	border: 0;
	border-radius: 8px;
	background: var(--tn-btn-accent-bg, var(--tn-accent, #f5f0e6));
	color: var(--tn-btn-accent-text, #0a0a0a);
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	box-sizing: border-box;
}

.tnp__cta:hover,
.tnp__submit:hover {
	filter: brightness(1.06);
	color: var(--tn-btn-accent-text, #0a0a0a);
}

.tnp__submit[disabled] {
	opacity: 0.65;
	cursor: wait;
}

.tnp__dismiss {
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 10px 12px;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 14px;
	opacity: 0.75;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tnp__dismiss:hover {
	opacity: 1;
}

body.tnp-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.tnp--media-left .tnp__panel {
		grid-template-columns: 1fr;
	}

	.tnp--media-left .tnp__media img {
		max-height: 200px;
		min-height: 0;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.tnp__panel {
		animation: tnp-in 0.28s ease;
	}

	.tnp--sheet .tnp__panel {
		animation-name: tnp-up;
	}
}

@keyframes tnp-in {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.98);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes tnp-up {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

/* Installed PWA: keep the panel above the bottom tab bar */
@media (display-mode: standalone), (display-mode: fullscreen), (display-mode: minimal-ui) {
	.tnp {
		padding-bottom: calc(5.15rem + env(safe-area-inset-bottom, 0px));
	}
}

html.tn-pwa-ios-standalone .tnp,
body.tn-pwa-standalone .tnp {
	padding-bottom: calc(5.15rem + env(safe-area-inset-bottom, 0px));
}
