/* Always hide PDP quantity — each add is qty 1 with its own greeting card. */
.single-product form.cart .quantity,
.single-product form.cart .quantity-nav,
.single-product .woocommerce-variation-add-to-cart .quantity,
.single-product .commercekit-pdp-sticky .quantity,
.single-product .commercekit-pdp-sticky .quantity-nav,
body.single-product .product form.cart .quantity {
	display: none !important;
}

.single-product form.cart .single_add_to_cart_button,
.single-product form.cart button.single_add_to_cart_button,
.single-product .woocommerce-variation-add-to-cart .single_add_to_cart_button {
	float: none !important;
	width: 100% !important;
	margin-left: 0 !important;
	margin-inline-start: 0 !important;
}

.hs-greeting-card,
.hs-greeting-card-modal {
	--hs-card-ivory: var(--sal-brand-ivory, #f2e8d4);
	--hs-card-bronze: var(--sal-brand-bronze, #a17549);
	--hs-card-ink: var(--sal-text-primary, #34271d);
	--hs-card-muted: var(--sal-text-secondary, #5c4a3c);
	--hs-card-border: var(--sal-border-subtle, #d8cdb9);
	--hs-card-focus: var(--sal-focus-ring, #7b5736);
	--hs-card-error: var(--sal-error, #8c3f36);
	--hs-card-white: var(--sal-neutral-white, #ffffff);
	--hs-card-radius: 4px;
}

.hs-greeting-card--accordion {
	clear: both;
	width: 100%;
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
	background: transparent;
}

/*
 * Sticky ATC drawer: the greeting block sits as a direct child of the
 * sticky form (outside CommerceKit’s 24px padded inner), so give it
 * matching side inset and breathing room from the drawer chrome.
 */
form.cart.commercekit_sticky-atc .hs-greeting-card--accordion,
.commercekit-pdp-sticky .hs-greeting-card--accordion,
.commercekit-pdp-sticky-inner .hs-greeting-card--accordion,
.commercekit-atc-sticky-tabs .hs-greeting-card--accordion {
	box-sizing: border-box;
	width: auto;
	max-width: none;
	margin: 0.35rem 1.5rem 1.15rem;
	padding: 0;
}

form.cart.commercekit_sticky-atc .hs-greeting-card--accordion .hs-greeting-card__toggle,
.commercekit-pdp-sticky .hs-greeting-card--accordion .hs-greeting-card__toggle {
	padding-inline: 0.15rem;
}

form.cart.commercekit_sticky-atc .hs-greeting-card__panel,
.commercekit-pdp-sticky .hs-greeting-card__panel,
.commercekit-pdp-sticky-inner .hs-greeting-card__panel {
	max-height: 40vh;
	overflow: auto;
}

/* Variable products: hide the whole control until a variation is chosen. */
.hs-greeting-card--variable {
	overflow: hidden;
	max-height: 0;
	opacity: 0;
	margin-top: 0;
	margin-bottom: 0;
	pointer-events: none;
	transform: translateY(-0.25rem);
	transition:
		max-height var(--sal-duration-reveal, 280ms) var(--sal-ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
		opacity var(--sal-duration-reveal, 280ms) var(--sal-ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
		margin var(--sal-duration-reveal, 280ms) var(--sal-ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
		transform var(--sal-duration-reveal, 280ms) var(--sal-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.hs-greeting-card--variable.is-visible {
	max-height: 18rem;
	opacity: 1;
	margin-bottom: 1rem;
	pointer-events: auto;
	transform: translateY(0);
}

.hs-greeting-card__toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 0.55rem 0.15rem;
	border: 0;
	border-bottom: 1px solid var(--hs-card-border);
	background: transparent;
	color: var(--hs-card-ink);
	cursor: pointer;
	font-family: inherit;
	text-align: start;
}

.hs-greeting-card__toggle:hover .hs-greeting-card__toggle-title {
	text-decoration: underline;
	text-underline-offset: 0.16em;
}

.hs-greeting-card__toggle:focus-visible {
	outline: 2px solid var(--hs-card-focus);
	outline-offset: 2px;
}

.hs-greeting-card__toggle:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.hs-greeting-card__toggle-text {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 0.4rem;
}

.hs-greeting-card__toggle-title {
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.3;
}

.hs-greeting-card__optional {
	color: var(--hs-card-bronze);
	font-size: 0.625rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.hs-greeting-card__toggle-icon {
	position: relative;
	display: block;
	width: 0.7rem;
	height: 0.7rem;
	flex: 0 0 auto;
	color: var(--hs-card-muted);
	transition: transform var(--sal-duration-control, 160ms) var(--sal-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.hs-greeting-card__toggle-icon::before,
.hs-greeting-card__toggle-icon::after {
	position: absolute;
	inset-inline-start: 0;
	top: 50%;
	width: 100%;
	height: 1.5px;
	background: currentColor;
	content: "";
	transform: translateY(-50%);
}

.hs-greeting-card__toggle-icon::after {
	transform: translateY(-50%) rotate(90deg);
}

.hs-greeting-card--accordion.is-open .hs-greeting-card__toggle-icon {
	transform: rotate(45deg);
}

.hs-greeting-card__panel {
	overflow: hidden;
	margin-top: 0.65rem;
	padding: 0.7rem 0.8rem 0.55rem;
	border: 1px solid var(--hs-card-border);
	border-radius: var(--hs-card-radius);
	background: var(--hs-card-ivory);
	animation: hs-greeting-panel-in var(--sal-duration-reveal, 280ms) var(--sal-ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.hs-greeting-card__panel[hidden] {
	display: none;
}

@keyframes hs-greeting-panel-in {
	from {
		opacity: 0;
		transform: translateY(-0.35rem);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.hs-greeting-card__hint {
	margin: 0 0 0.45rem;
	color: var(--hs-card-muted);
	font-size: 0.75rem;
	line-height: 1.35;
}

.hs-greeting-card__panel-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 0.25rem;
}

.hs-greeting-card__remove {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--hs-card-muted);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.hs-greeting-card__remove:focus-visible {
	outline: 2px solid var(--hs-card-focus);
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.hs-greeting-card--variable,
	.hs-greeting-card__toggle-icon,
	.hs-greeting-card__panel {
		transition: none;
		animation: none;
		transform: none;
	}
}

.hs-greeting-card__input,
.hs-greeting-card-modal__input {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 0;
	padding: 0.45rem 0.6rem;
	box-sizing: border-box;
	border: 1px solid var(--hs-card-border);
	border-radius: var(--hs-card-radius);
	background: var(--hs-card-white, #ffffff);
	color: var(--hs-card-ink);
	font-family: inherit;
	font-size: 0.875rem;
	line-height: 1.4;
	resize: vertical;
}

.hs-greeting-card-modal textarea.hs-greeting-card-modal__input {
	background: #ffffff;
	background-color: #ffffff;
}

.hs-greeting-card__input {
	min-height: 3.2rem;
	max-height: 6.5rem;
	resize: none;
}

.hs-greeting-card__input:hover,
.hs-greeting-card-modal__input:hover {
	border-color: var(--hs-card-bronze);
}

.hs-greeting-card__input:focus-visible,
.hs-greeting-card-modal__input:focus-visible {
	outline: 2px solid var(--hs-card-focus);
	outline-offset: 2px;
}

.hs-greeting-card__count,
.hs-greeting-card-modal__count {
	margin: 0.25rem 0 0;
	color: var(--hs-card-muted);
	font-size: 0.6875rem;
	letter-spacing: 0.04em;
	line-height: 1.3;
	text-align: end;
}

.hs-greeting-card-checkout {
	margin-top: 0.4rem;
	padding: 0;
	max-width: none;
	border: 0;
	background: none;
}

.hs-greeting-card-checkout.is-empty {
	background: none;
}

.hs-greeting-card-checkout__head {
	display: flex;
	align-items: baseline;
	justify-content: flex-start;
	gap: 0.65rem;
	margin-bottom: 0.15rem;
}

.hs-greeting-card-checkout__label {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	margin: 0;
	color: var(--sal-text-secondary, #5c4a3c);
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	line-height: 1.3;
	text-transform: uppercase;
}

.hs-greeting-card-checkout__icon {
	display: none;
}

.hs-greeting-card-checkout__preview {
	margin: 0;
	color: var(--sal-text-primary, #34271d);
	font-size: 0.8125rem;
	font-style: normal;
	font-weight: 400;
	line-height: 1.4;
	white-space: pre-wrap;
}

.hs-greeting-card-checkout.is-empty .hs-greeting-card-checkout__preview {
	color: var(--sal-text-secondary, #5c4a3c);
	font-family: inherit;
	font-size: 0.8125rem;
	font-style: normal;
	font-weight: 400;
}

.hs-greeting-card-checkout__edit {
	flex: 0 0 auto;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--sal-brand-bronze, #a17549);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0;
	line-height: 1.3;
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.hs-greeting-card-checkout__edit:focus-visible {
	outline: 2px solid var(--sal-focus-ring, #7b5736);
	outline-offset: 2px;
}

.woocommerce-checkout-review-order-table .cart_item .product-name {
	padding-top: 0.85rem;
	padding-bottom: 0.85rem;
}

.woocommerce-checkout-review-order-table .product-name .product-quantity {
	display: inline-block;
	margin-top: 0.35rem;
	color: var(--sal-text-secondary, #5c4a3c);
	font-size: 0.8125rem;
}

.hs-greeting-card-modal {
	position: fixed;
	inset: 0;
	z-index: 100060;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.25rem;
	color: var(--sal-text-primary, #34271d);
}

.hs-greeting-card-modal.is-open {
	display: flex;
}

.hs-greeting-card-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgb(52 39 29 / 58%);
}

.hs-greeting-card-modal__dialog {
	position: relative;
	z-index: 1;
	width: min(28rem, 100%);
	padding: 2rem 1.5rem 1.5rem;
	background: var(--sal-brand-ivory, #f2e8d4);
	border: 1px solid var(--sal-border-subtle, #d8cdb9);
	box-shadow: var(--sal-shadow-raised, 0 12px 32px rgb(52 39 29 / 10%));
}

.hs-greeting-card-modal__eyebrow {
	margin: 0 0 0.5rem;
	color: var(--sal-brand-bronze, #a17549);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1.25;
	text-transform: uppercase;
}

.hs-greeting-card-modal__title {
	margin: 0 0 1rem;
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 600;
	letter-spacing: -0.03em;
	line-height: 1.25;
}

.hs-greeting-card-modal__label {
	display: block;
	margin-bottom: 0.45rem;
	font-size: 0.875rem;
	font-weight: 600;
}

.hs-greeting-card-modal__error {
	margin: 0.65rem 0 0;
	color: var(--sal-error, #8c3f36);
	font-size: 0.875rem;
	line-height: 1.45;
}

.hs-greeting-card-modal__save {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 48px;
	margin-top: 1.1rem;
	padding: 0.75rem 1.125rem;
	border: 0;
	border-radius: 2px;
	background: var(--sal-text-primary, #34271d);
	color: var(--sal-brand-ivory, #f2e8d4);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.9375rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.hs-greeting-card-modal__save:disabled {
	cursor: wait;
	opacity: 0.55;
}

.hs-greeting-card-modal__save:focus-visible {
	outline: 2px solid var(--sal-focus-ring, #7b5736);
	outline-offset: 2px;
}

.hs-greeting-card-modal__cancel {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	margin-top: 0.55rem;
	padding: 0.45rem 0;
	border: 0;
	background: transparent;
	color: var(--sal-text-secondary, #5c4a3c);
	cursor: pointer;
	font-family: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

html.hs-greeting-card-modal-lock,
html.hs-greeting-card-modal-lock body {
	overflow: hidden;
}

html[lang="ar"] .hs-greeting-card__optional,
html[lang="ar"] .hs-greeting-card-checkout__label,
html[lang="ar"] .hs-greeting-card-modal__eyebrow {
	letter-spacing: 0;
	text-transform: none;
}

html[lang="ar"] .hs-greeting-card-checkout__preview {
	font-family: var(--sal-font-arabic-display, "Noto Naskh Arabic", serif);
	font-style: normal;
}

@media (prefers-reduced-motion: reduce) {
	.hs-greeting-card-modal__save {
		transition: none;
	}
}
