.dtdsp-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, 0.75);
	opacity: 0;
	transition: opacity 0.2s ease;
	box-sizing: border-box;
}

.dtdsp-overlay[hidden] {
	display: none;
}

.dtdsp-overlay.is-visible {
	opacity: 1;
}

.dtdsp-box {
	position: relative;
	width: 100%;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	transform: scale(0.96);
	transition: transform 0.2s ease;
}

.dtdsp-overlay.is-visible .dtdsp-box {
	transform: scale(1);
}

.dtdsp-image-link {
	display: block;
	line-height: 0;
}

.dtdsp-box img.dtdsp-image {
	display: block;
	width: 100%;
	height: auto;
	max-height: calc(100vh - 120px);
	object-fit: contain;
	border-radius: 6px;
	margin: 0;
}

/* Close (X) */
.dtdsp-close {
	position: absolute;
	top: -14px;
	right: -14px;
	z-index: 5;
	width: 36px;
	height: 36px;
	padding: 7px;
	margin: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: #0B0B0D;
	color: #fff;
	cursor: pointer;
	line-height: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.dtdsp-close svg {
	width: 100%;
	height: 100%;
	display: block;
}

.dtdsp-close:hover,
.dtdsp-close:focus-visible {
	background: #E50935;
	outline: none;
}

/* Button */
.dtdsp-button {
	display: inline-block;
	padding: 12px 28px;
	border-radius: 4px;
	font-weight: 700;
	font-size: 16px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	line-height: 1.2;
	transition: filter 0.15s ease;
}

.dtdsp-button:hover,
.dtdsp-button:focus-visible {
	filter: brightness(1.12);
}

/* Text layouts: shared */
.dtdsp-card {
	position: relative;
	width: 100%;
	max-height: calc(100vh - 32px);
	overflow-x: hidden;
	overflow-y: auto;
	border-radius: 6px;
	box-sizing: border-box;
}

.dtdsp-content {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 24px 28px 28px;
	box-sizing: border-box;
}

.dtdsp-align-left {
	text-align: left;
	align-items: flex-start;
}

.dtdsp-align-center {
	text-align: center;
	align-items: center;
}

.dtdsp-align-right {
	text-align: right;
	align-items: flex-end;
}

.dtdsp-overlay .dtdsp-content .dtdsp-title {
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: clamp(22px, 4.5vw, 32px);
	line-height: 1.15;
}

.dtdsp-text {
	font-size: 16px;
	line-height: 1.5;
	color: inherit;
}

.dtdsp-text p {
	margin: 0 0 0.6em;
	color: inherit;
}

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

.dtdsp-content .dtdsp-button {
	margin-top: 6px;
}

/* Layout: image on top, text below */
.dtdsp-layout-image-text .dtdsp-card img.dtdsp-image {
	border-radius: 0;
	max-height: 60vh;
}

/* Layout: background image, text on top (height follows the text) */
.dtdsp-bg {
	display: flex;
	align-items: center;
	min-height: 220px;
	background: #0B0B0D;
}

.dtdsp-bg img.dtdsp-bg-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center;
	margin: 0;
	border-radius: 0;
}

.dtdsp-shade {
	position: absolute;
	inset: 0;
}

.dtdsp-cover-link {
	position: absolute;
	inset: 0;
	z-index: 1;
}

.dtdsp-bg .dtdsp-content {
	position: relative;
	z-index: 2;
	width: 100%;
	padding: 48px 32px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.dtdsp-bg.dtdsp-has-cover .dtdsp-content {
	pointer-events: none;
}

.dtdsp-bg.dtdsp-has-cover .dtdsp-content .dtdsp-button {
	pointer-events: auto;
}

.dtdsp-bg .dtdsp-button {
	text-shadow: none;
}

html.dtdsp-open {
	overflow: hidden;
}

@media (max-width: 767px) {
	.dtdsp-close {
		top: -10px;
		right: -6px;
	}

	.dtdsp-content {
		padding: 20px 20px 24px;
	}

	.dtdsp-bg .dtdsp-content {
		padding: 40px 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.dtdsp-overlay,
	.dtdsp-box {
		transition: none;
	}
}
