/*
 * Styles the embedded WooCommerce checkout so it reads as part of the landing
 * page. Everything is scoped to .hc-checkout — the standalone checkout page is
 * untouched. Colour tokens fall back to the brand palette when the landing
 * page's own variables are not present.
 */

.hc-checkout {
	--hc-leaf: var(--leaf, #488070);
	--hc-leaf-deep: var(--leaf-deep, #2c5548);
	--hc-ink: var(--leaf-ink, #10231c);
	--hc-citrus: var(--citrus, #f0901e);
	--hc-mist: var(--mist, #ebf2ee);
	--hc-line: var(--line, rgba(72, 128, 112, 0.22));
	--hc-muted: var(--muted, #5e7770);

	direction: rtl;
	text-align: right;
	font-family: var(--body, "IBM Plex Sans Arabic", system-ui, sans-serif);
	color: var(--hc-ink);
}

.hc-checkout .woocommerce {
	max-width: none;
}

/* ---------- Panels ---------- */

.hc-checkout #customer_details,
.hc-checkout #order_review,
.hc-checkout .woocommerce-form-coupon {
	background: #fff;
	border: 1px solid var(--hc-line);
	border-radius: var(--radius, 18px);
	padding: clamp(18px, 3vw, 26px);
	margin-bottom: 18px;
	box-shadow: 0 18px 40px -32px rgba(16, 35, 28, 0.6);
}

.hc-checkout #order_review {
	background: var(--hc-mist);
	border-color: transparent;
}

.hc-checkout .col2-set,
.hc-checkout .col2-set .col-1,
.hc-checkout .col2-set .col-2 {
	width: 100%;
	float: none;
	max-width: none;
}

.hc-checkout h3,
.hc-checkout #order_review_heading {
	font-family: var(--display, "Readex Pro", system-ui, sans-serif);
	font-size: clamp(19px, 2.4vw, 23px);
	font-weight: 600;
	color: var(--hc-leaf-deep);
	margin: 0 0 14px;
}

/* ---------- Fields ---------- */

.hc-checkout .form-row {
	padding: 0;
	margin: 0 0 14px;
	width: 100%;
	float: none;
}

.hc-checkout .form-row label {
	display: block;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--hc-muted);
	margin-bottom: 6px;
}

.hc-checkout .required {
	color: var(--hc-citrus);
	text-decoration: none;
}

.hc-checkout input[type="text"],
.hc-checkout input[type="tel"],
.hc-checkout input[type="email"],
.hc-checkout input[type="number"],
.hc-checkout input[type="password"],
.hc-checkout textarea,
.hc-checkout select,
.hc-checkout .select2-container .select2-selection--single {
	width: 100%;
	box-sizing: border-box;
	/* 16px keeps iOS Safari from zooming when a field is focused. */
	font-size: 16px;
	font-family: inherit;
	line-height: 1.5;
	padding: 14px 16px;
	height: auto;
	min-height: 52px;
	color: var(--hc-ink);
	background: #fff;
	border: 1.5px solid var(--hc-line);
	border-radius: 14px;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.hc-checkout textarea {
	min-height: 90px;
	resize: vertical;
}

.hc-checkout input:focus,
.hc-checkout textarea:focus,
.hc-checkout select:focus {
	outline: none;
	border-color: var(--hc-leaf);
	box-shadow: 0 0 0 3px rgba(72, 128, 112, 0.16);
}

.hc-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
	left: 12px;
	right: auto;
	height: 100%;
}

/* ---------- Order review ---------- */

.hc-checkout .woocommerce-checkout-review-order-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 16px;
	background: transparent;
}

.hc-checkout .woocommerce-checkout-review-order-table th,
.hc-checkout .woocommerce-checkout-review-order-table td {
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid var(--hc-line);
	font-size: 15.5px;
	text-align: right;
	background: transparent;
}

.hc-checkout .woocommerce-checkout-review-order-table tfoot .order-total th,
.hc-checkout .woocommerce-checkout-review-order-table tfoot .order-total td {
	font-size: 19px;
	font-weight: 700;
	color: var(--hc-leaf-deep);
	border-bottom: 0;
}

/* ---------- Payment ---------- */

.hc-checkout #payment {
	background: transparent;
	border-radius: 0;
}

.hc-checkout #payment ul.payment_methods {
	list-style: none;
	margin: 0 0 16px;
	padding: 0;
	border: 0;
}

.hc-checkout #payment ul.payment_methods li {
	background: #fff;
	border: 1.5px solid var(--hc-line);
	border-radius: 14px;
	padding: 14px 16px;
	margin-bottom: 10px;
	list-style: none;
}

.hc-checkout #payment ul.payment_methods li label {
	font-weight: 600;
	display: inline;
}

.hc-checkout #payment div.payment_box {
	background: var(--hc-mist);
	color: var(--hc-muted);
	font-size: 14px;
	border-radius: 12px;
	margin: 10px 0 0;
	padding: 12px 14px;
}

.hc-checkout #payment div.payment_box::before {
	display: none;
}

.hc-checkout #place_order,
.hc-checkout .hc-checkout__fallback-btn {
	display: block;
	width: 100%;
	font-family: var(--display, "Readex Pro", system-ui, sans-serif);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.2;
	padding: 17px 26px;
	border: 0;
	border-radius: 999px;
	cursor: pointer;
	text-align: center;
	text-decoration: none;
	color: #3a2306;
	background: var(--hc-citrus);
	box-shadow: 0 10px 26px -12px rgba(240, 144, 30, 0.9);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.hc-checkout form.checkout #place_order {
	width: 100% !important;
	background: var(--hc-citrus) !important;
	background-image: none !important;
	color: #3a2306 !important;
	border: 0 !important;
	border-radius: 999px !important;
	font-size: 18px !important;
	padding: 17px 26px !important;
	box-shadow: 0 10px 26px -12px rgba(240, 144, 30, 0.9) !important;
}

.hc-checkout #place_order:hover,
.hc-checkout .hc-checkout__fallback-btn:hover {
	transform: translateY(-1px);
	color: #3a2306;
}

/* ---------- Coupon + notices ---------- */

.hc-checkout .woocommerce-form-coupon-toggle .woocommerce-info,
.hc-checkout .woocommerce-info,
.hc-checkout .woocommerce-error,
.hc-checkout .woocommerce-message {
	background: var(--hc-mist);
	color: var(--hc-leaf-deep);
	border-top: 3px solid var(--hc-leaf);
	border-radius: 12px;
	font-size: 14.5px;
	padding: 14px 16px 14px 16px;
	margin-bottom: 16px;
	list-style: none;
}

.hc-checkout .woocommerce-error {
	border-top-color: #c0392b;
	color: #7b1f14;
	background: #fdeceb;
}

.hc-checkout .woocommerce-info::before,
.hc-checkout .woocommerce-error::before,
.hc-checkout .woocommerce-message::before {
	display: none;
}

.hc-checkout .checkout_coupon .form-row {
	width: 100%;
}

/* WooCommerce hides the coupon field behind a link that is easy to miss on a
   phone. On this page the field is always open. */
.hc-checkout .woocommerce-form-coupon-toggle {
	display: none;
}

.hc-checkout form.checkout_coupon {
	display: block !important;
	margin: 0 0 18px;
}

.hc-checkout form.checkout_coupon > p:first-of-type {
	margin-top: 0;
}

.hc-checkout form.checkout_coupon .form-row-first,
.hc-checkout form.checkout_coupon .form-row-last {
	width: 100%;
	float: none;
	margin: 0 0 10px;
}

.hc-checkout form.checkout_coupon label {
	font-size: 15px;
	color: var(--hc-leaf-deep);
}

.hc-checkout__coupon-notice:empty {
	display: none;
}

.hc-checkout__coupon-notice ul,
.hc-checkout__coupon-notice li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.hc-checkout form.checkout_coupon.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

@media (min-width: 520px) {
	.hc-checkout form.checkout_coupon {
		display: flex !important;
		flex-wrap: wrap;
		align-items: flex-end;
		gap: 10px;
	}

	.hc-checkout form.checkout_coupon .form-row-first {
		flex: 1 1 200px;
		margin-bottom: 0;
	}

	.hc-checkout form.checkout_coupon .form-row-last {
		flex: 0 0 auto;
		width: auto;
		margin-bottom: 0;
	}

	.hc-checkout form.checkout_coupon button {
		width: auto;
		padding: 0 28px;
	}

	.hc-checkout form.checkout_coupon .clear {
		display: none;
	}
}

.hc-checkout .checkout_coupon button {
	width: 100%;
	min-height: 52px;
	border: 0;
	border-radius: 14px;
	background: var(--hc-leaf);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
}

.hc-checkout .hc-checkout__fallback {
	margin: 16px 0 0;
	text-align: center;
	font-size: 14px;
}

.hc-checkout .hc-checkout__fallback a {
	color: var(--hc-muted);
	text-decoration: underline;
}

.hc-checkout .blockUI.blockOverlay {
	border-radius: var(--radius, 18px);
}

/* ---------- Wider screens ---------- */

@media (min-width: 900px) {
	.hc-checkout .woocommerce form.checkout {
		display: grid;
		grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
		gap: 24px;
		align-items: start;
	}

	.hc-checkout #customer_details {
		grid-column: 1;
		grid-row: 1 / span 3;
		margin-bottom: 0;
	}

	.hc-checkout .woocommerce-form-coupon-toggle,
	.hc-checkout .woocommerce-form-coupon,
	.hc-checkout #order_review_heading,
	.hc-checkout #order_review,
	.hc-checkout .hc-checkout__fallback {
		grid-column: 2;
	}
}

/* ---------- Loading placeholder ---------- */

.hc-checkout__skeleton {
	display: block;
	min-height: 520px;
}

.hc-checkout__skeleton span {
	display: block;
	height: 52px;
	margin-bottom: 14px;
	border-radius: 14px;
	background: linear-gradient(90deg, rgba(72,128,112,.08), rgba(72,128,112,.16), rgba(72,128,112,.08));
	background-size: 200% 100%;
	animation: hc-checkout-pulse 1.4s ease-in-out infinite;
}

.hc-checkout__skeleton span:first-child {
	height: 90px;
}

.hc-checkout__skeleton span:last-child {
	height: 120px;
}

@keyframes hc-checkout-pulse {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.hc-checkout__skeleton span {
		animation: none;
	}
}

.hc-checkout__error {
	background: #fdeceb;
	color: #7b1f14;
	border-radius: 12px;
	padding: 14px 16px;
	text-align: center;
	font-size: 15px;
}
