/* Board House gift voucher page (woocommerce/content-single-gift-voucher.php): product image left, everything else
   stacked on the right. Scoped to .bh-voucher; the plugin's own inline colours use !important, so the overrides for
   the amount buttons need it too. */

.woocommerce div.bh-voucher {
	--bh-navy: #00364d;
	--bh-navy-dark: #002a3c;
	--bh-accent: #ff3f00;
	--bh-accent-dark: #cb3200;
	--bh-line: #dfe5e8;
	--bh-soft: #f3f6f7;
	--bh-text: #1f2d33;
	--bh-muted: #5f6f76;
	font-family: "Bai Jamjuree", sans-serif;
	color: var(--bh-text);
	padding: 10px 0 60px;
}

.bh-voucher__top {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 50px;
	align-items: start;
}

/* ---------- Left: product image ---------- */

.bh-voucher__image {
	position: sticky;
	top: 30px;
}

.bh-voucher__image a,
.bh-voucher__image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 14px;
}

/* ---------- Right: title, price, intro, the plugin's form as numbered steps ---------- */

.bh-voucher__main {
	display: block;
	min-width: 0;
}

.woocommerce div.bh-voucher .bh-voucher__main .product_title {
	margin: 0 0 10px;
}

.woocommerce div.bh-voucher .bh-voucher__price {
	margin: 0 0 16px;
	font-size: 24px;
	font-weight: 700;
	color: var(--bh-navy);
}

.woocommerce div.bh-voucher .bh-voucher__price .amount {
	color: inherit;
}

.bh-voucher__intro {
	font-size: 16px;
	line-height: 1.6;
	color: var(--bh-muted);
}

.bh-voucher__intro p {
	margin: 0 0 4px;
}

.bh-voucher__form {
	counter-reset: bh-step;
	margin-top: 26px;
}

.woocommerce div.bh-voucher .gift-cards_form {
	margin: 0;
}

/* Step headings (the plugin's own titles). "Delivery info" is only a wrapper title, so it goes. */
.woocommerce div.bh-voucher .spgc_delivery_info_title {
	display: none;
}

.woocommerce div.bh-voucher .spgc_select_amount_title,
.woocommerce div.bh-voucher .spgc_recipient_info_title,
.woocommerce div.bh-voucher .spgc-sender-info-title {
	counter-increment: bh-step;
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	margin: 0 0 14px;
	font-family: "Bai Jamjuree", sans-serif;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	color: var(--bh-navy);
}

.woocommerce div.bh-voucher .spgc_select_amount_title::before,
.woocommerce div.bh-voucher .spgc_recipient_info_title::before,
.woocommerce div.bh-voucher .spgc-sender-info-title::before {
	content: counter(bh-step);
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--bh-navy);
	color: #fff;
	font-size: 14px;
}

.woocommerce div.bh-voucher .gift-cards-list,
.woocommerce div.bh-voucher .gift-card-content-editor {
	margin: 0 0 18px;
	padding: 22px;
	border: 1px solid var(--bh-line);
	border-radius: 14px;
	background: #fff;
}

.woocommerce div.bh-voucher .gift-card-content-editor {
	padding-bottom: 8px;
}

.woocommerce div.bh-voucher .spgc-sender-info-title {
	margin-top: 10px;
	padding-top: 22px;
	border-top: 1px solid var(--bh-line);
}

.woocommerce div.bh-voucher .spgc-single-recipient {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 16px;
}

/* Amounts */
.woocommerce div.bh-voucher .gift-cards-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* never cut off "150,00 €" */
	gap: 10px;
}

.woocommerce div.bh-voucher .gift-cards-list > .spgc_select_amount_title,
.woocommerce div.bh-voucher .gift-cards-list > .spgc-manual-amount-container,
.woocommerce div.bh-voucher .gift-cards-list > :not(button):not(input) {
	grid-column: 1 / -1;
}

.woocommerce div.bh-voucher .gift-cards-list > input[type="hidden"] {
	display: none;
}

.woocommerce div.bh-voucher .gift-cards-list button.spgc-amount-buttons {
	margin: 0 !important;
	height: 58px;
	padding: 0 10px;
	border: 2px solid var(--bh-line) !important;
	border-radius: 12px;
	background: #fff !important;
	color: var(--bh-navy) !important;
	font-family: "Bai Jamjuree", sans-serif;
	font-size: 18px;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	box-shadow: none;
	transition: border-color .15s, background-color .15s, color .15s;
}

.woocommerce div.bh-voucher .gift-cards-list button.spgc-amount-buttons:hover {
	border-color: var(--bh-navy) !important;
}

.woocommerce div.bh-voucher .gift-cards-list button.spgc-amount-buttons.selected_button {
	border-color: var(--bh-accent) !important;
	background: var(--bh-accent) !important;
	color: #fff !important;
}

.woocommerce div.bh-voucher .gift-cards-list .spgc-manual-amount-container {
	display: flex;
	align-items: stretch;
	margin: 0;
	height: 52px;
	border: 2px solid var(--bh-line) !important;
	border-radius: 12px;
	overflow: hidden;
	background: #fff !important;
}

.woocommerce div.bh-voucher .gift-cards-list .spgc-manual-amount-container:focus-within,
.woocommerce div.bh-voucher .gift-cards-list .spgc-manual-amount-container.selected_button {
	border-color: var(--bh-accent) !important;
}

.woocommerce div.bh-voucher .spgc-manual-amount-container .spgc-manual-currency-symbol {
	display: flex;
	align-items: center;
	padding: 0 16px;
	background: var(--bh-soft) !important;
	color: var(--bh-navy) !important;
	font-weight: 700;
}

.woocommerce div.bh-voucher .spgc-manual-amount-container .spgc-manual-currency-symbol.left {
	display: none;
}

.woocommerce div.bh-voucher .gift-cards-list .spgc-manual-amount-container input#spgc-manual-amount {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	margin: 0;
	padding: 0 16px;
	border: 0 !important;
	border-radius: 0;
	background: #fff !important;
	color: var(--bh-text) !important;
	font-size: 16px;
	box-shadow: none;
}

.woocommerce div.bh-voucher .spgc-manual-amount-error {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 13px;
	color: #c62828;
}

/* Recipient / sender fields: label above the input */
.woocommerce div.bh-voucher .gift-card-content-editor .clearfix::before,
.woocommerce div.bh-voucher .gift-card-content-editor .clearfix::after {
	content: none;
}

.woocommerce div.bh-voucher .gift-card-content-editor .spgc-recipient-name,
.woocommerce div.bh-voucher .gift-card-content-editor .spgc-recipient-email,
.woocommerce div.bh-voucher .gift-card-content-editor .spgc-sender-name,
.woocommerce div.bh-voucher .gift-card-content-editor .spgc-message {
	margin: 0 0 14px;
}

.woocommerce div.bh-voucher .gift-card-content-editor label {
	display: block;
	float: none;
	width: auto;
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	text-align: left;
	color: var(--bh-muted);
}

.woocommerce div.bh-voucher .gift-card-content-editor input[type="text"],
.woocommerce div.bh-voucher .gift-card-content-editor input[type="email"],
.woocommerce div.bh-voucher .gift-card-content-editor textarea {
	box-sizing: border-box;
	display: block;
	float: none;
	width: 100% !important;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid var(--bh-line);
	border-radius: 10px;
	background: var(--bh-soft);
	color: var(--bh-text);
	font-family: "Bai Jamjuree", sans-serif;
	font-size: 15px;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .15s, background-color .15s;
}

.woocommerce div.bh-voucher .gift-card-content-editor input[type="text"],
.woocommerce div.bh-voucher .gift-card-content-editor input[type="email"] {
	height: 48px;
}

.woocommerce div.bh-voucher .gift-card-content-editor textarea {
	min-height: 110px;
	resize: vertical;
}

.woocommerce div.bh-voucher .gift-card-content-editor input:focus,
.woocommerce div.bh-voucher .gift-card-content-editor textarea:focus {
	outline: none;
	border-color: var(--bh-navy);
	background: #fff;
}

/* Add to cart */
.woocommerce div.bh-voucher .gift_card_template_button {
	display: block;
	margin: 0;
}

.woocommerce div.bh-voucher form.cart .gift_card_template_button button.single_add_to_cart_button {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 58px;
	margin: 0;
	padding: 0 24px;
	border: 0;
	border-radius: 12px;
	background: var(--bh-accent);
	color: #fff;
	font-family: "Bai Jamjuree", sans-serif;
	font-size: 17px;
	font-weight: 700;
	letter-spacing: .5px;
	text-transform: uppercase;
	box-shadow: 0 12px 24px -12px rgba(255, 63, 0, .8);
	transition: background-color .15s, transform .15s;
}

.woocommerce div.bh-voucher form.cart .gift_card_template_button button.single_add_to_cart_button:hover {
	background: var(--bh-accent-dark);
	color: #fff;
}

.woocommerce div.bh-voucher form.cart .gift_card_template_button button.single_add_to_cart_button:disabled {
	opacity: .5;
	cursor: not-allowed;
}

.bh-voucher__redeem {
	display: inline-block;
	margin-top: 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--bh-navy);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.bh-voucher__redeem:hover {
	color: var(--bh-accent);
}

/* ---------- Description ---------- */

.bh-voucher__details {
	margin-top: 56px;
	padding: 34px 38px;
	border-radius: 16px;
	background: var(--bh-soft);
	font-size: 15px;
	line-height: 1.7;
	color: var(--bh-muted);
}

.bh-voucher__details > :first-child {
	margin-top: 0;
}

.bh-voucher__details > :last-child {
	margin-bottom: 0;
}

.bh-voucher__details h2,
.bh-voucher__details h3,
.bh-voucher__details h4 {
	margin: 0 0 10px;
	font-family: "Bai Jamjuree", sans-serif;
	font-size: 19px;
	font-weight: 700;
	color: var(--bh-navy);
}

.bh-voucher__details * + h2,
.bh-voucher__details * + h3,
.bh-voucher__details * + h4 {
	margin-top: 22px;
}

.bh-voucher__details hr {
	margin: 22px 0;
	border: 0;
	border-top: 1px solid var(--bh-line);
}

/* ---------- Tablet / mobile: image on top, then the rest ---------- */

@media (max-width: 991px) {
	.bh-voucher__top {
		grid-template-columns: minmax(0, 1fr);
		gap: 26px;
	}

	.bh-voucher__image {
		position: static;
		max-width: 520px;
		width: 100%;
		margin: 0 auto;
	}
}

@media (max-width: 767px) {
	.woocommerce div.bh-voucher {
		padding-bottom: 40px;
	}

	.woocommerce div.bh-voucher .gift-cards-list,
	.woocommerce div.bh-voucher .gift-card-content-editor {
		padding: 18px 16px;
	}

	.woocommerce div.bh-voucher .spgc-single-recipient {
		grid-template-columns: minmax(0, 1fr);
	}

	.woocommerce div.bh-voucher .gift-cards-list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 8px;
	}

	.woocommerce div.bh-voucher .gift-cards-list button.spgc-amount-buttons {
		height: 50px;
		padding: 0 4px;
		font-size: 14px;
	}

	.bh-voucher__details {
		margin-top: 36px;
		padding: 24px 20px;
	}
}
