/**
 * Tiny On-Exit Pop-Up - Frontend Styles
 * Bottom-left floating modal with full-screen dimmed backdrop.
 */

/* Backdrop overlay covering the whole page */
.toep-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999998;
	display: block;
	pointer-events: auto;
}

.toep-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.68);
	opacity: 0;
	transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
	cursor: pointer;
}

.toep-overlay.toep-visible .toep-backdrop {
	opacity: 1;
}

/* Modal Card positioned bottom-left */
.toep-modal {
	position: fixed;
	bottom: 32px;
	left: 32px;
	width: 360px;
	max-width: calc(100vw - 44px);
	background: #ffffff;
	border-radius: 12px;
	padding: 24px 22px 22px 22px;
	box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.45), 0 2px 8px rgba(0, 0, 0, 0.08);
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: #0f172a;
	z-index: 999999;
	opacity: 0;
	transform: translateY(24px) scale(0.97);
	transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
	text-align: left;
}

.toep-overlay.toep-visible .toep-modal {
	opacity: 1;
	transform: translateY(0) scale(1);
}

/* Close Button (X) */
.toep-close-btn {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 32px;
	height: 32px;
	border: none;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	padding: 0;
	transition: all 0.15s ease;
}

.toep-close-btn:hover,
.toep-close-btn:focus-visible {
	color: #0f172a;
	background: #f1f5f9;
	outline: none;
}

.toep-close-btn svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* Headline */
.toep-headline {
	font-size: 16.5px;
	font-weight: 700;
	line-height: 1.38;
	color: var(--toep-headline-color, #0f172a);
	margin: 0 26px 10px 0;
	letter-spacing: -0.01em;
}

/* Accent Highlight Span */
.toep-headline .toep-accent,
.toep-accent {
	font-weight: 700;
	color: var(--toep-accent-color, #0038ff) !important;
	display: inline;
}

/* Description Copy */
.toep-description {
	font-size: 13px;
	line-height: 1.55;
	color: #475569;
	margin: 0 0 14px 0;
}

/* Graphic Container (~16:9 ratio) */
.toep-image-wrap {
	width: 100%;
	margin: 0 0 16px 0;
	overflow: hidden;
	border-radius: 8px;
	background: #f8fafc;
	display: flex;
	align-items: center;
	justify-content: center;
}

.toep-image {
	width: 100%;
	aspect-ratio: 16 / 9;
	height: auto;
	object-fit: contain;
	display: block;
	border-radius: 8px;
	transition: transform 0.4s ease;
}

.toep-image.toep-fit-contain {
	object-fit: contain;
}

.toep-image.toep-fit-cover {
	object-fit: cover;
}

.toep-image.toep-fit-fill {
	object-fit: fill;
}

.toep-modal:hover .toep-image {
	transform: scale(1.015);
}

/* Call to Action Button */
.toep-btn-action {
	display: block;
	width: 100%;
	text-align: center;
	text-decoration: none !important;
	padding: 13px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	color: #ffffff !important;
	background-color: #0c0702;
	border-radius: 6px;
	box-sizing: border-box;
	cursor: pointer;
	border: none;
	outline: none;
	transition: opacity 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.toep-btn-action:hover {
	opacity: 0.92;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toep-btn-action:active {
	transform: translateY(0);
}

/* Mobile Responsiveness Adjustment */
@media (max-width: 640px) {
	.toep-modal {
		bottom: 16px;
		left: 16px;
		right: 16px;
		width: auto;
		max-width: calc(100vw - 32px);
		padding: 20px 18px 18px 18px;
	}

	.toep-headline {
		font-size: 15.5px;
	}

	.toep-description {
		font-size: 12.5px;
	}
}
