/* Product dialogs */
.hc-dialog {
	--hc-dialog-edge: #dfddd8;
	--hc-dialog-muted: #5c5a56;
	--hc-dialog-tint: #f6f5f2;
	--hc-dialog-inset: clamp(18px, 4vw, 32px);
	position: fixed;
	inset: 0;
	width: min(calc(100% - 32px), 530px);
	max-width: none;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: transparent;
	color: #171715;
	overflow: visible;
}
.hc-dialog:not([open]) { display: none; }
.hc-dialog::backdrop { background: rgb(0 0 0 / 55%); }
body:has(.hc-dialog[open]) { overflow: hidden; }
.hc-dialog-content {
	position: relative;
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	padding: var(--hc-dialog-inset);
	border-radius: inherit;
	background: #fff;
	box-shadow: 0 22px 80px #0004;
	overflow: auto;
	overscroll-behavior: contain;
	overflow-wrap: anywhere;
}
.hc-dialog .hc-dialog-close {
	position: absolute;
	z-index: 1;
	inset-block-start: 12px;
	inset-inline-end: 12px;
	display: grid;
	place-items: center;
	width: 42px;
	height: 42px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--hc-dialog-edge);
	border-radius: 50%;
	color: #171715;
	background: #fff;
	cursor: pointer;
	transition: background-color .18s, border-color .18s;
}
.hc-dialog-close::before,
.hc-dialog-close::after {
	content: '';
	grid-area: 1 / 1;
	width: 14px;
	height: 1.5px;
	background: currentColor;
	transform: rotate(45deg);
}
.hc-dialog-close::after { transform: rotate(-45deg); }
.hc-dialog .hc-dialog-close:hover { background: var(--hc-dialog-tint); border-color: #aaa7a0; }
.hc-dialog :focus-visible,
.hc-single .hc-variant-trigger:focus-visible {
	outline: 2px solid #292724;
	outline-offset: 3px;
}
.hc-dialog-heading { padding-inline-end: 38px; margin-bottom: 20px; }
.hc-dialog .hc-dialog-heading h2 {
	margin: 0;
	color: #171715;
	font: 600 clamp(21px, 4.6vw, 28px)/1.2 Montserrat, sans-serif !important;
	letter-spacing: -.03em !important;
}
.hc-dialog-product {
	display: grid;
	grid-template-columns: clamp(54px, 16vw, 76px) minmax(0, 1fr);
	gap: 14px;
	align-items: center;
	padding: 12px;
	border: 1px solid var(--hc-dialog-edge);
	border-radius: 8px;
	background: var(--hc-dialog-tint);
}
.hc-dialog-product img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 5px;
	background: #eee;
}
.hc-dialog .hc-dialog-product-title {
	margin: 0;
	font: 600 15px/1.45 Montserrat, sans-serif !important;
	overflow-wrap: anywhere;
}
.hc-dialog .hc-dialog-product-meta,
.hc-dialog .hc-review-summary {
	margin: 3px 0 0;
	color: var(--hc-dialog-muted);
	font-size: 13px;
	line-height: 1.5;
}
.hc-dialog .hc-dialog-product-meta :is(p, .amount) { margin: 0; }
.hc-cart-heading { display: flex; align-items: center; gap: 12px; min-height: 40px; }
.hc-cart-confirmation-mark {
	display: grid;
	place-items: center;
	flex: 0 0 38px;
	height: 38px;
	border-radius: 50%;
	background: #171715;
	color: #fff;
}
.hc-cart-confirmation-mark::after {
	content: '';
	width: 8px;
	height: 14px;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: translateY(-1px) rotate(45deg);
}
.hc-cart-summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin-block: 17px;
	padding-block: 12px;
	border-block: 1px solid var(--hc-dialog-edge);
}
.hc-cart-summary p { margin: 0; font-weight: 600; }
.hc-cart-summary > div > span { color: var(--hc-dialog-muted); font-size: 13px; }
.hc-cart-summary strong { font-size: clamp(17px, 4vw, 22px); font-variant-numeric: tabular-nums; }
.hc-cart-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.hc-cart-actions .hc-dialog-action--primary { grid-column: 1 / -1; }
.hc-dialog .hc-dialog-action,
.hc-review-dialog #review_form #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 9px 12px;
	border: 1px solid #a8a5a0;
	border-radius: 5px;
	background: #fff;
	color: #171715;
	text-align: center;
	text-decoration: none;
	font: 600 13px/1.35 Montserrat, sans-serif !important;
	cursor: pointer;
	transition: background-color .18s, border-color .18s, color .18s;
}
.hc-dialog .hc-dialog-action:hover { background: var(--hc-dialog-tint); border-color: #171715; }
.hc-dialog .hc-dialog-action--primary,
.hc-review-dialog #review_form #respond input#submit { background: #171715; color: #fff; border-color: #171715; }
.hc-dialog .hc-dialog-action--primary:hover,
.hc-review-dialog #review_form #respond input#submit:hover { background: #373531; border-color: #373531; color: #fff; }

/* WooCommerce review form */
.hc-review-dialog { width: min(calc(100% - 32px), 620px); }
.hc-review-dialog .hc-dialog-heading { min-height: 26px; }
.hc-review-dialog .hc-dialog-product { grid-template-columns: 52px minmax(0, 1fr); }
.hc-review-dialog .woocommerce-Reviews-title { display: none; }
.hc-review-dialog #reviews { margin: 16px 0 0; }
.hc-review-dialog #reviews .woocommerce-noreviews {
	margin: 0 0 16px;
	color: var(--hc-dialog-muted);
	font-size: 14px;
}
.hc-review-dialog #reviews #comments ol.commentlist { margin: 0 0 16px; padding: 0; }
.hc-review-dialog #reviews #comments ol.commentlist li .comment-text {
	border: 1px solid var(--hc-dialog-edge);
	border-radius: 7px;
}
.hc-review-dialog #review_form_wrapper { border-top: 1px solid var(--hc-dialog-edge); padding-top: 16px; }
.hc-review-dialog #reply-title {
	display: block;
	margin: 0 0 13px;
	color: #171715;
	font: 600 17px/1.4 Montserrat, sans-serif !important;
}
.hc-review-dialog #review_form #respond form {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
}
.hc-review-dialog #review_form #respond form > :not(.comment-form-author, .comment-form-email) { grid-column: 1 / -1; }
.hc-review-dialog #review_form #respond form :is(p, .comment-form-rating) { margin: 0; }
.hc-review-dialog #review_form #respond .comment-notes { color: var(--hc-dialog-muted); font-size: 13px; line-height: 1.5; }
.hc-review-dialog #review_form #respond .comment-form-rating .stars { margin: 6px 0 0; }
.hc-review-dialog #review_form #respond label {
	display: block;
	margin: 0 0 5px;
	color: #171715;
	font-size: 14px;
	font-weight: 600;
}
.hc-review-dialog #review_form #respond :is(input[type="text"], input[type="email"], textarea) {
	display: block;
	width: 100%;
	min-height: 44px;
	padding: 9px 11px;
	border: 1px solid #a8a5a0;
	border-radius: 5px;
	background: #fff;
	color: #171715;
	font-size: 16px;
}
.hc-review-dialog #review_form #respond textarea { min-height: 94px; height: 94px; resize: vertical; }
.hc-review-dialog #review_form #respond .comment-form-cookies-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}
.hc-review-dialog #review_form #respond .comment-form-cookies-consent label {
	margin: 0;
	color: var(--hc-dialog-muted);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.5;
}
.hc-review-dialog #review_form #respond .comment-form-cookies-consent input {
	margin: 3px 0 0;
	accent-color: #171715;
}
.hc-review-dialog #review_form #respond input#submit { min-width: 140px; }
.hc-review-dialog #review_form #respond .stars > span { display: flex; flex-wrap: wrap; gap: 5px; }
.hc-review-dialog #review_form #respond .stars a {
	display: grid;
	place-items: center;
	width: clamp(38px, 11vw, 46px);
	height: 44px;
	border: 1px solid var(--hc-dialog-edge);
	border-radius: 6px;
	color: #322f29;
	background: #fff;
	text-decoration: none;
	overflow: hidden;
	transition: background-color .16s, border-color .16s, transform .16s;
}
.hc-review-dialog #review_form #respond .stars a::before {
	position: absolute;
	display: grid;
	place-items: center;
	inset: 0;
	width: auto;
	height: auto;
	font-size: 23px;
}
.hc-review-dialog #review_form #respond .stars a:is(:hover, .active) {
	background: var(--hc-dialog-tint);
	border-color: #a8a5a0;
}
.hc-review-dialog #review_form #respond .stars a:active { transform: scale(.94); }
.hc-review-dialog #review_form #respond .stars a:focus-visible { outline-offset: 1px; }

/* Variant picker backed by the WooCommerce select */
.hc-single .productView-options .variations { width: 100%; }
.hc-single .productView-options .variations :is(th.label, td.value) {
	display: block;
	width: 100%;
	padding: 0;
	border: 0;
	background: transparent;
	text-align: start;
}
.hc-single .productView-options .variations th.label label {
	display: block;
	margin: 0 0 6px;
	color: #171715;
	font-size: 13px;
	font-weight: 650;
}
.hc-single .productView-options .variations td.value { padding-bottom: 10px; }
.hc-single .productView-options .variations select:not([hidden]),
.hc-single .hc-variant-trigger {
	width: 100%;
	min-height: 48px;
	padding: 10px 14px;
	border: 1px solid #a8a5a0;
	border-radius: 6px;
	color: #171715;
	background-color: #fff;
	font: inherit;
	font-size: 15px;
}
.hc-variant-picker { position: relative; min-width: 0; }
.hc-single .hc-variant-trigger {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	text-align: start;
	cursor: pointer;
	transition: background-color .18s, border-color .18s;
}
.hc-variant-trigger span { color: #5c5a56; overflow-wrap: anywhere; }
.hc-variant-trigger.has-value span { color: #171715; }
.hc-single .hc-variant-trigger:is(:hover, [aria-expanded="true"]) { background: #faf9f7; border-color: #171715; }
.hc-variant-trigger::after {
	content: '';
	flex: 0 0 7px;
	height: 7px;
	margin-inline-end: 3px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: translateY(-2px) rotate(45deg);
	transition: transform .18s;
}
.hc-variant-trigger[aria-expanded="true"]::after { transform: translateY(2px) rotate(225deg); }
.hc-variant-trigger:disabled { cursor: default; opacity: .65; }
.hc-variant-options {
	position: absolute;
	z-index: 15;
	inset: calc(100% + 5px) 0 auto;
	max-height: 240px;
	padding: 4px;
	border: 1px solid #c4c0b9;
	border-radius: 7px;
	background: #fff;
	box-shadow: 0 8px 22px #0002;
	overflow: auto;
	overscroll-behavior: contain;
}
.hc-variant-picker.opens-above .hc-variant-options { inset: auto 0 calc(100% + 5px); }
.hc-variant-option {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	min-height: 42px;
	padding: 8px 10px;
	border-radius: 4px;
	color: #171715;
	font-size: 14px;
	overflow-wrap: anywhere;
	cursor: pointer;
}
.hc-variant-option:is(.is-active, :hover) { background: #f6f5f2; }
.hc-variant-option[aria-selected="true"] { font-weight: 650; }
.hc-variant-option[aria-selected="true"]::after {
	content: '';
	flex: 0 0 6px;
	height: 11px;
	margin-inline-end: 2px;
	border: solid currentColor;
	border-width: 0 1.5px 1.5px 0;
	transform: rotate(45deg);
}
.hc-variant-option[aria-disabled="true"] { color: #67645f; text-decoration: line-through; cursor: default; }
.hc-single .productView-options a.reset_variations { margin-top: 5px; color: #5c5a56; text-decoration: underline; }
.hc-single .single_add_to_cart_button[aria-busy="true"]::after {
	content: '';
	display: inline-block;
	width: 11px;
	height: 11px;
	margin-inline-start: 8px;
	border: 1px solid currentColor;
	border-inline-end-color: transparent;
	border-radius: 50%;
}

@media (max-width: 480px) {
	.hc-dialog .hc-dialog-close { width: 38px; height: 38px; }
	.hc-cart-heading { gap: 8px; }
	.hc-cart-confirmation-mark { flex-basis: 31px; height: 31px; }
	.hc-review-dialog #review_form #respond form { grid-template-columns: minmax(0, 1fr); }
	.hc-review-dialog #review_form #respond input#submit { width: 100%; }
}
@media (prefers-reduced-motion: no-preference) {
	.hc-dialog[open] { animation: hc-product-dialog-in .24s cubic-bezier(.2,.75,.25,1) both; }
	.hc-dialog[open]::backdrop { animation: hc-product-backdrop-in .2s ease both; }
	.hc-dialog[open].is-closing::backdrop { animation: hc-product-backdrop-in .15s ease reverse both; }
	.hc-variant-options:not([hidden]) { animation: hc-variant-options-in .15s ease-out both; }
	.hc-single .single_add_to_cart_button[aria-busy="true"]::after { animation: hc-cart-spin .65s linear infinite; }
	@keyframes hc-product-dialog-in { from { opacity: 0; transform: translateY(12px) scale(.986); } to { opacity: 1; transform: none; } }
	@keyframes hc-product-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
	@keyframes hc-variant-options-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
	@keyframes hc-cart-spin { to { transform: rotate(360deg); } }
}
@media (prefers-reduced-motion: reduce) {
	.hc-dialog *, .hc-variant-picker * { transition: none !important; }
}
