.chc-qv-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
}

.chc-qv-modal.is-open {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.chc-qv-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
}

.chc-qv-modal__dialog {
	position: relative;
	width: min(920px, calc(100% - 32px));
	max-height: min(88vh, 900px);
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
	overflow: hidden;
	z-index: 2;
}

.chc-qv-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 40px;
	height: 40px;
	border: 1px solid var(--chc-color-border);
	border-radius: 999px;
	background: #fff;
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
	z-index: 3;
}

.chc-qv-modal__body {
	padding: 28px;
	min-height: 240px;
	max-height: 88vh;
	overflow: auto;
}

.chc-qv-modal__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(280px, 0.9fr);
	gap: 28px;
	align-items: start;
}

.chc-qv-modal__media img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 10px;
}

.chc-qv-modal__title {
	margin: 0 0 12px;
	font-size: 1.8rem;
	line-height: 1.2;
}

.chc-qv-modal__price {
	margin-bottom: 16px;
	font-size: 1.2rem;
	font-weight: 700;
}

.chc-qv-modal__description {
	color: var(--chc-color-text);
}

.chc-qv-modal__description > *:first-child {
	margin-top: 0;
}

.chc-qv-modal__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.chc-qv-modal__actions .button,
.chc-qv-modal__actions .added_to_cart,
.chc-qv-modal__view-product {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 16px;
	border-radius: var(--chc-radius);
	text-decoration: none;
}

.chc-qv-modal__loading,
.chc-qv-modal__error {
	padding: 48px 20px;
	text-align: center;
}

.chc-qv-modal__loading::before {
	content: "";
	display: block;
	width: 34px;
	height: 34px;
	margin: 0 auto 14px;
	border: 3px solid #e5e7eb;
	border-top-color: #111;
	border-radius: 999px;
	animation: chc-qv-spin 0.8s linear infinite;
}

@keyframes chc-qv-spin {
	to {
		transform: rotate(360deg);
	}
}

.chc-qv-modal__error {
	color: #b42318;
}

body.chc-qv-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	.chc-qv-modal {
		overflow: hidden;
	}

	.chc-qv-modal.is-open {
		padding: 10px;
	}

	.chc-qv-modal__dialog {
		width: calc(100vw - 20px);
		max-width: calc(100vw - 20px);
		max-height: 92vh;
		margin: 0 auto;
	}

	.chc-qv-modal__body {
		padding: 20px;
		max-height: 92vh;
		overflow-y: auto;
		overflow-x: hidden;
	}

	.chc-qv-modal__grid {
		grid-template-columns: 1fr;
		gap: 20px;
		min-width: 0;
	}

	.chc-qv-modal__title {
		font-size: 1.5rem;
	}
}