/*
 * Book product page accents. Colors are centralized here as custom
 * properties: if the exact gold hex used elsewhere on the site differs,
 * only these two lines need editing.
 *
 * The quantity stepper itself is NOT styled here anymore -- it's styled
 * site-wide (all products, not just books) to match the site's own brand
 * color, in wp-content/themes/woodmart-child/style.css. Keeping a second,
 * conflicting black/gold override here would just fight that rule.
 */
:root {
	--cma-black: #121212;
	--cma-gold: #c8a24d;
	--cma-gold-soft: rgba(200, 162, 77, 0.12);
	--cma-cream: #f4efe4;
}

/* ---------------- Checkout: notices ---------------- */

.cma-bf-notice {
	direction: rtl;
	text-align: right;
	background: var(--cma-black);
	color: var(--cma-cream);
	border: 1px solid var(--cma-gold);
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 13.5px;
	line-height: 1.6;
}

/* ---------------- Checkout: field layout for book-only carts ---------------- */

.woocommerce-checkout .required {
	color: #c0392b;
	font-weight: 700;
}

.woocommerce-checkout form.woocommerce-checkout .woocommerce-invalid input.input-text,
.woocommerce-checkout form.woocommerce-checkout .woocommerce-invalid select {
	border-color: #c0392b !important;
	box-shadow: 0 0 0 1px #c0392b;
}

@media ( max-width: 600px ) {
	.woocommerce-checkout .form-row-first,
	.woocommerce-checkout .form-row-last {
		width: 100% !important;
		float: none !important;
	}
	.woocommerce-checkout .col2-set,
	.woocommerce-checkout .col-1,
	.woocommerce-checkout .col-2 {
		width: 100% !important;
		float: none !important;
	}
	.woocommerce-checkout input.input-text,
	.woocommerce-checkout select,
	.woocommerce-checkout textarea {
		max-width: 100%;
		box-sizing: border-box;
	}
}

/* Quick-access download button appended directly onto the "Thank you, your
   order has been received" line -- visible immediately, no scrolling past
   the order-summary list needed to find it. */
.cma-bf-quick-download-wrap {
	display: block;
	margin-top: 14px;
}

.cma-bf-quick-download-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--cma-gold);
	color: var(--cma-black) !important;
	font-weight: 700;
	font-size: 14.5px;
	padding: 13px 30px;
	border-radius: 9px;
	text-decoration: none !important;
	box-shadow: 0 4px 14px rgba(200, 162, 77, 0.3);
	transition: filter 0.15s ease, transform 0.15s ease;
}

.cma-bf-quick-download-btn:hover {
	filter: brightness(1.08);
	transform: translateY(-1px);
}

@media (max-width: 480px) {
	.cma-bf-quick-download-btn {
		width: 100%;
		justify-content: center;
	}
}

/* Thank-you / order-received download box. */
.cma-bf-thankyou {
	--cma-black: #121212;
	--cma-gold: #c8a24d;
	--cma-cream: #f4efe4;
	direction: rtl;
	max-width: 640px;
	margin: 28px auto;
}

.cma-bf-thankyou-box {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 20px;
	background: var(--cma-black);
	border: 1px solid var(--cma-gold);
	border-radius: 14px;
	padding: 24px;
	margin-bottom: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.cma-bf-thankyou-cover {
	flex: 0 0 auto;
	width: 96px;
	height: 128px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid rgba(200, 162, 77, 0.4);
}

.cma-bf-thankyou-info {
	flex: 1 1 220px;
	min-width: 0;
	text-align: right;
}

.cma-bf-thankyou-title {
	margin: 0 0 8px;
	color: var(--cma-cream);
	font-size: 18px;
}

.cma-bf-thankyou-msg {
	margin: 0 0 14px;
	color: var(--cma-gold);
	font-weight: 700;
	font-size: 14.5px;
}

.cma-bf-thankyou-msg.cma-bf-pending {
	color: var(--cma-cream);
}

.cma-bf-thankyou-btn {
	display: inline-block;
	background: var(--cma-gold);
	color: var(--cma-black) !important;
	font-weight: 700;
	padding: 12px 28px;
	border-radius: 8px;
	text-decoration: none !important;
	margin-bottom: 10px;
}

.cma-bf-thankyou-btn:hover {
	filter: brightness(1.08);
}

.cma-bf-thankyou-note {
	margin: 4px 0 0;
	color: rgba(244, 239, 228, 0.65);
	font-size: 12.5px;
}

@media ( max-width: 480px ) {
	.cma-bf-thankyou-box {
		flex-direction: column;
		text-align: center;
	}
	.cma-bf-thankyou-info {
		text-align: center;
	}
}
