/* CVD Designer Help — modal inside Design Studio V6.4 */

.cvd-dh-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.22s ease, visibility 0.22s ease;
	font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.cvd-dh-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.cvd-dh-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(3, 3, 10, 0.82);
	backdrop-filter: blur(6px);
}

.cvd-dh-modal__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: min(980px, 100%);
	max-height: min(88vh, 840px);
	border-radius: 20px;
	overflow: hidden;
	background: linear-gradient(160deg, #1a1333 0%, #0f0a1f 100%);
	border: 1px solid rgba(167, 139, 250, 0.28);
	box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(124, 58, 237, 0.12);
}

.cvd-dh-modal__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px 14px;
	border-bottom: 1px solid rgba(167, 139, 250, 0.12);
}

.cvd-dh-modal__eyebrow {
	margin: 0 0 6px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #a78bfa;
}

.cvd-dh-modal__head h2 {
	margin: 0 0 6px;
	font-size: 1.45rem;
	font-weight: 800;
	color: #fff;
	line-height: 1.2;
}

.cvd-dh-modal__lead {
	margin: 0;
	font-size: 14px;
	line-height: 1.5;
	color: #e5e7eb;
	max-width: 560px;
}

.cvd-dh-modal__close {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.cvd-dh-modal__close:hover {
	background: rgba(124, 58, 237, 0.45);
	transform: scale(1.05);
}

.cvd-dh-modal__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 14px 24px;
	background: rgba(0, 0, 0, 0.18);
	border-bottom: 1px solid rgba(167, 139, 250, 0.1);
}

.cvd-dh-modal__filter {
	padding: 8px 15px;
	border: 1px solid rgba(167, 139, 250, 0.3);
	border-radius: 999px;
	background: rgba(15, 10, 31, 0.6);
	color: #f3f4f6;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.cvd-dh-modal__filter:hover {
	border-color: rgba(167, 139, 250, 0.55);
	transform: translateY(-1px);
}

.cvd-dh-modal__filter.is-active {
	color: #fff;
	background: linear-gradient(135deg, #7c3aed, #9333ea);
	border-color: transparent;
	box-shadow: 0 6px 18px rgba(124, 58, 237, 0.35);
}

.cvd-dh-modal__body {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 20px 24px 24px;
	scrollbar-color: rgba(167, 139, 250, 0.45) transparent;
	scrollbar-width: thin;
}

.cvd-dh-modal__body::-webkit-scrollbar {
	width: 8px;
}

.cvd-dh-modal__body::-webkit-scrollbar-thumb {
	background: rgba(167, 139, 250, 0.35);
	border-radius: 999px;
}

.cvd-dh-modal__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.cvd-dh-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: 16px;
	border: 1px solid #e5e7eb;
	background: #fff;
	text-align: left;
	cursor: pointer;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.cvd-dh-card:hover {
	transform: translateY(-3px);
	border-color: #c4b5fd;
	box-shadow: 0 16px 36px rgba(124, 58, 237, 0.28);
}

.cvd-dh-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 152px;
	background: linear-gradient(145deg, #f5f3ff 0%, #ede9fe 100%);
	border-bottom: 1px solid #e5e7eb;
	overflow: hidden;
}

.cvd-dh-card__thumb {
	width: 100%;
	height: 152px;
	object-fit: cover;
	display: block;
}

.cvd-dh-card__play {
	position: absolute;
	width: 52px;
	height: 52px;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	padding-left: 3px;
	color: #fff;
	background: linear-gradient(135deg, #7c3aed, #9333ea);
	box-shadow: 0 8px 24px rgba(76, 29, 149, 0.45);
}

.cvd-dh-card__icon {
	font-size: 42px;
	color: #7c3aed;
}

.cvd-dh-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px 16px 18px;
}

.cvd-dh-card__type {
	display: inline-flex;
	align-self: flex-start;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #5b21b6;
	background: #ede9fe;
}

.cvd-dh-card__title {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	line-height: 1.35;
	color: #111827;
}

.cvd-dh-card__summary {
	margin: 0;
	font-size: 13px;
	line-height: 1.55;
	color: #4b5563;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
}

.cvd-dh-modal__detail[hidden],
.cvd-dh-modal__empty[hidden] {
	display: none !important;
}

.cvd-dh-modal__back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 14px;
	padding: 8px 12px;
	border: 1px solid rgba(167, 139, 250, 0.25);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.06);
	color: #e9d5ff;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.cvd-dh-modal__back:hover {
	color: #fff;
	background: rgba(124, 58, 237, 0.35);
}

.cvd-dh-modal__player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin-bottom: 16px;
	border-radius: 14px;
	overflow: hidden;
	background: #05050a;
	border: 1px solid rgba(167, 139, 250, 0.25);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.cvd-dh-modal__player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.cvd-dh-modal__player-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	padding: 24px;
	text-align: center;
	color: #9ca3af;
	font-size: 14px;
}

.cvd-dh-modal__article {
	padding: 18px 20px;
	border-radius: 14px;
	background: #fff;
	border: 1px solid #e5e7eb;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.cvd-dh-modal__article h3 {
	margin: 0 0 10px;
	font-size: 1.2rem;
	font-weight: 800;
	color: #111827;
	line-height: 1.3;
}

.cvd-dh-modal__article p {
	margin: 0;
	font-size: 14px;
	line-height: 1.65;
	color: #374151;
}

.cvd-dh-modal__empty {
	padding: 48px 24px;
	text-align: center;
	color: #e9d5ff;
	font-size: 15px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px dashed rgba(167, 139, 250, 0.3);
	border-radius: 14px;
}

body.cvd-dh-modal-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	.cvd-dh-modal {
		padding: 12px;
		align-items: flex-end;
	}

	.cvd-dh-modal__dialog {
		width: 100%;
		max-height: 92vh;
		border-bottom-left-radius: 0;
		border-bottom-right-radius: 0;
	}

	.cvd-dh-modal__head {
		padding: 18px 16px 12px;
	}

	.cvd-dh-modal__filters {
		padding: 12px 16px;
	}

	.cvd-dh-modal__body {
		padding: 16px;
	}

	.cvd-dh-modal__grid {
		grid-template-columns: 1fr;
	}

	.cvd-dh-card__summary {
		-webkit-line-clamp: 4;
	}
}
