/* «الحافظ» checkout + order-received shell. Tokens mirror the Sakina Green design. */
.hz-shell {
	--hz-bg: #F4F6F3;
	--hz-surface: #FFFFFF;
	--hz-tint: #E8EEE9;
	--hz-ink: #16261F;
	--hz-muted: #4A5A52;
	--hz-line: #D5DED8;
	--hz-accent: #1E5B45;
	--hz-accent-deep: #133F30;
	--hz-on-accent: #F4F6F3;
	--hz-error: #9B2C2C;
	--hz-heading: "Readex Pro", sans-serif;
	--hz-body: "IBM Plex Sans Arabic", sans-serif;

	margin: 0;
	background: var(--hz-bg);
	color: var(--hz-ink);
	font-family: var(--hz-body);
	font-size: 16px;
	line-height: 1.7;
	direction: rtl;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

.hz-shell *, .hz-shell *::before, .hz-shell *::after { box-sizing: border-box; }
.hz-shell a { color: var(--hz-accent); }

/* ---------- top & bottom ---------- */
.hz-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 2rem;
	border-bottom: 1px solid var(--hz-line);
	background: var(--hz-bg);
}
.hz-brand {
	font-family: var(--hz-heading);
	font-weight: 700;
	font-size: 1.5rem;
	line-height: 1.2;
	color: var(--hz-accent) !important;
	text-decoration: none;
}
.hz-back { font-size: 0.95rem; color: var(--hz-muted) !important; text-decoration: none; }
.hz-back:hover { color: var(--hz-accent) !important; }
.hz-main { flex: 1 0 auto; padding: 2.5rem 1.25rem 4rem; }
.hz-foot {
	padding: 1.5rem;
	text-align: center;
	font-size: 0.9rem;
	color: var(--hz-muted);
	border-top: 1px solid var(--hz-line);
}

/* ---------- checkout column ---------- */
.hz-checkout { max-width: 36rem; margin: 0 auto; }
.hz-checkout .woocommerce { max-width: none; }

.hz-intro { margin: 0 0 1.5rem; }
.hz-intro h1 {
	font-family: var(--hz-heading);
	font-weight: 600;
	font-size: 2rem;
	line-height: 1.3;
	margin: 0 0 0.35rem;
	color: var(--hz-ink);
}
.hz-intro p { margin: 0; color: var(--hz-muted); font-size: 1.05rem; }

.hz-summary {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	margin: 0 0 1.5rem;
	background: var(--hz-surface);
	border: 1px solid var(--hz-line);
	border-radius: 14px;
}
.hz-summary-img img {
	display: block;
	width: 5.5rem;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: 8px;
}
.hz-summary-text { flex: 1 1 auto; display: flex; flex-direction: column; gap: 0.15rem; min-width: 0; }
.hz-summary-name { font-family: var(--hz-heading); font-weight: 600; font-size: 1.05rem; line-height: 1.4; }
.hz-summary-meta { font-size: 0.9rem; color: var(--hz-muted); }
.hz-summary-price {
	font-family: var(--hz-heading);
	font-weight: 700;
	font-size: 1.35rem;
	color: var(--hz-accent);
	white-space: nowrap;
}

/* steps */
.hz-shell form.checkout {
	background: var(--hz-surface);
	border: 1px solid var(--hz-line);
	border-radius: 14px;
	padding: 1.75rem 1.75rem 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 0;
}
.hz-step-head { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; }
.hz-step-head h2 {
	font-family: var(--hz-heading);
	font-weight: 600;
	font-size: 1.2rem;
	line-height: 1.4;
	margin: 0;
	color: var(--hz-ink);
}
.hz-step-num {
	flex: 0 0 auto;
	width: 2rem;
	height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--hz-tint);
	color: var(--hz-accent);
	font-family: var(--hz-heading);
	font-weight: 600;
	font-size: 0.95rem;
}

/* strip WooCommerce's default two-column / headings */
.hz-shell #customer_details.col2-set,
.hz-shell #customer_details .col-1,
.hz-shell #customer_details .col-2 { width: 100% !important; float: none !important; max-width: none; margin: 0; padding: 0; }
.hz-shell #customer_details .col-2,
.hz-shell .woocommerce-billing-fields > h3,
.hz-shell #order_review_heading,
.hz-shell .woocommerce-checkout-review-order-table,
.hz-shell #payment .wc_payment_methods,
.hz-shell #payment .payment_box,
.hz-shell .woocommerce-additional-fields { display: none !important; }

/* fields */
.hz-shell .woocommerce-billing-fields__field-wrapper { display: flex; flex-direction: column; gap: 1rem; }
.hz-shell .form-row { margin: 0 !important; padding: 0 !important; width: 100% !important; float: none !important; }
.hz-shell .form-row label {
	display: block;
	font-weight: 600;
	font-size: 0.98rem;
	margin: 0 0 0.4rem;
	color: var(--hz-ink);
}
.hz-shell .form-row label .required { color: var(--hz-accent); text-decoration: none; border: 0; }
.hz-shell .form-row .optional { display: none; }
.hz-shell .form-row input.input-text {
	width: 100%;
	font-family: var(--hz-body);
	font-size: 1.05rem;
	color: var(--hz-ink);
	background: var(--hz-bg);
	border: 1px solid var(--hz-line);
	border-radius: 6px;
	padding: 0.85rem 1rem;
	line-height: 1.4;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.hz-shell #billing_phone { text-align: right; }
.hz-shell .form-row input.input-text::placeholder { color: #7B8981; }
.hz-shell .form-row input.input-text:focus {
	outline: none;
	border-color: var(--hz-accent);
	box-shadow: 0 0 0 3px rgba(30, 91, 69, 0.15);
	background: var(--hz-surface);
}
.hz-shell .form-row.woocommerce-invalid input.input-text { border-color: var(--hz-error); }
.hz-shell .form-row .description {
	display: block !important;
	position: static !important;
	background: none !important;
	color: var(--hz-muted) !important;
	padding: 0 !important;
	margin: 0.35rem 0 0 !important;
	font-size: 0.88rem;
}
.hz-shell .form-row .description::before { display: none !important; }

/* payment step */
.hz-pay { margin: 1.75rem 0 0; padding: 1.75rem 0 0; border-top: 1px solid var(--hz-line); }
.hz-accounts { display: flex; flex-direction: column; gap: 0.6rem; margin: 0 0 1rem; }
.hz-account {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	background: var(--hz-tint);
	border-radius: 6px;
}
.hz-account-label { font-weight: 600; color: var(--hz-ink); }
.hz-account-value {
	flex: 1 1 auto;
	font-family: var(--hz-heading);
	font-weight: 600;
	font-size: 1.1rem;
	color: var(--hz-accent-deep);
	text-align: left;
	letter-spacing: 0.02em;
}
.hz-account-missing { color: var(--hz-error); font-size: 0.9rem; background: #F7ECEC; }
.hz-copy {
	font-family: var(--hz-body);
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--hz-accent);
	background: var(--hz-surface);
	border: 1px solid var(--hz-line);
	border-radius: 999px;
	padding: 0.3rem 0.9rem;
	cursor: pointer;
}
.hz-copy:hover { border-color: var(--hz-accent); }

.hz-drop {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	padding: 1.5rem 1rem;
	border: 1.5px dashed #9FB3A8;
	border-radius: 14px;
	background: var(--hz-bg);
	color: var(--hz-accent);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}
.hz-drop:hover, .hz-drop.is-over { border-color: var(--hz-accent); background: var(--hz-tint); }
.hz-drop input[type="file"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
	width: 100%;
}
.hz-drop:focus-within { outline: 3px solid rgba(30, 91, 69, 0.3); outline-offset: 2px; }
.hz-drop-title { font-weight: 600; font-size: 1.02rem; color: var(--hz-ink); }
.hz-drop-hint { font-size: 0.88rem; color: var(--hz-muted); }
.hz-drop-preview {
	max-width: 9rem;
	max-height: 12rem;
	margin-top: 0.6rem;
	border-radius: 8px;
	border: 1px solid var(--hz-line);
	object-fit: contain;
}
.hz-drop.is-busy { opacity: 0.75; }
.hz-drop.is-done { border-style: solid; border-color: var(--hz-accent); background: var(--hz-tint); }
.hz-drop.is-error { border-color: var(--hz-error); }
.hz-drop-status { margin: 0.6rem 0 0; min-height: 1.4em; font-size: 0.92rem; color: var(--hz-muted); }
.hz-drop-status.is-done { color: var(--hz-accent); font-weight: 600; }
.hz-drop-status.is-error { color: var(--hz-error); font-weight: 600; }

/* confirm step */
.hz-confirm { margin: 1.75rem 0 0; padding: 1.75rem 0 0; border-top: 1px solid var(--hz-line); }
.hz-confirm .hz-step-head { margin: 0; }
.hz-shell #order_review { margin: 0; }
.hz-shell #payment { background: none !important; border-radius: 0; padding: 0; margin: 1rem 0 0; }
.hz-shell #payment .place-order { padding: 0 !important; margin: 0 !important; }
.hz-shell .woocommerce-privacy-policy-text { font-size: 0.85rem; color: var(--hz-muted); margin: 0 0 0.75rem; }
.hz-shell .woocommerce-privacy-policy-text p { margin: 0; }
.hz-shell #place_order {
	width: 100%;
	float: none;
	font-family: var(--hz-body);
	font-weight: 700;
	font-size: 1.15rem;
	color: var(--hz-on-accent);
	background: var(--hz-accent);
	border: 0;
	border-radius: 999px;
	padding: 1.05rem 2rem;
	cursor: pointer;
	transition: background-color 0.2s;
}
.hz-shell #place_order:hover { background: var(--hz-accent-deep); }

/* notices */
.hz-shell .woocommerce-NoticeGroup,
.hz-shell .woocommerce-notices-wrapper { margin: 0 0 1rem; }
.hz-shell .woocommerce-error,
.hz-shell .woocommerce-message,
.hz-shell .woocommerce-info {
	list-style: none;
	margin: 0 0 1rem;
	padding: 0.9rem 1.1rem;
	border-radius: 6px;
	border: 0;
	font-size: 0.95rem;
}
.hz-shell .woocommerce-error { background: #F7ECEC; color: var(--hz-error); }
.hz-shell .woocommerce-message, .hz-shell .woocommerce-info { background: var(--hz-tint); color: var(--hz-accent-deep); }
.hz-shell .woocommerce-error::before, .hz-shell .woocommerce-message::before, .hz-shell .woocommerce-info::before { display: none; }
.hz-shell .woocommerce-error li { margin: 0; }
.hz-shell .blockUI.blockOverlay { background: rgba(244, 246, 243, 0.6) !important; }

/* thank-you fallback */
.hz-fallback { max-width: 36rem; margin: 2rem auto; text-align: center; }
.hz-fallback h1 { font-family: var(--hz-heading); font-weight: 600; font-size: 2rem; }

@media (max-width: 767px) {
	.hz-top { padding: 0.85rem 1.25rem; }
	.hz-main { padding: 1.5rem 1rem 3rem; }
	.hz-intro h1 { font-size: 1.6rem; }
	.hz-shell form.checkout { padding: 1.25rem; }
	.hz-summary-img img { width: 4.5rem; }
	.hz-summary-price { font-size: 1.15rem; }
}

/* ---------- CartFlows checkout step: override its default orange ---------- */
.hz-shell .wcf-embed-checkout-form #place_order,
.hz-shell .wcf-embed-checkout-form .woocommerce #payment #place_order {
	background-color: var(--hz-accent) !important;
	border-color: var(--hz-accent) !important;
	color: var(--hz-on-accent) !important;
	border-radius: 999px !important;
	font-family: var(--hz-body) !important;
	font-weight: 700 !important;
	font-size: 1.15rem !important;
	padding: 1.05rem 2rem !important;
	box-shadow: none !important;
}
.hz-shell .wcf-embed-checkout-form #place_order:hover { background-color: var(--hz-accent-deep) !important; border-color: var(--hz-accent-deep) !important; }
.hz-shell .wcf-embed-checkout-form a { color: var(--hz-accent) !important; }
.hz-shell .wcf-embed-checkout-form .woocommerce form .form-row input.input-text:focus {
	border-color: var(--hz-accent) !important;
	box-shadow: 0 0 0 3px rgba(30, 91, 69, 0.15) !important;
}
.hz-shell .wcf-embed-checkout-form .form-row label,
.hz-shell .wcf-embed-checkout-form .form-row label .required { color: var(--hz-muted); }
.hz-shell .wcf-embed-checkout-form { font-family: var(--hz-body); }
.hz-shell .wcf-embed-checkout-form .woocommerce { background: none; }
