/**
 * WooCommerce checkout — Ecowise / Hamrah visual language.
 * Scoped to checkout so other pages stay untouched.
 */

body.ecowise-checkout-page {
	background: #fff;
}

body.ecowise-checkout-page .ecowise-main {
	background:
		radial-gradient(ellipse 70% 50% at 90% 0%, rgba(255, 145, 77, 0.12) 0%, transparent 55%),
		radial-gradient(ellipse 50% 40% at 0% 30%, rgba(255, 243, 234, 0.9) 0%, transparent 50%),
		#fff;
}

.ecowise-page--checkout {
	padding-top: 1.75rem;
	padding-bottom: 4.5rem;
	max-width: 960px;
}

.ecowise-checkout-hero {
	margin: 0 0 1.75rem;
	padding: 1.75rem 1.5rem;
	border-radius: 24px;
	background:
		radial-gradient(ellipse 60% 80% at 100% 0%, rgba(255, 255, 255, 0.35) 0%, transparent 50%),
		linear-gradient(135deg, #ffe8d4 0%, #ffc48a 35%, var(--hamrah-orange, #ff914d) 70%, #ff7300 100%);
	box-shadow:
		0 18px 40px rgba(255, 115, 0, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.4);
	color: #fff;
	text-align: right;
}

.ecowise-checkout-hero__eyebrow {
	display: inline-flex;
	margin-bottom: 0.55rem;
	padding: 0.28rem 0.75rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.22);
	border: 1px solid rgba(255, 255, 255, 0.35);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.ecowise-checkout-hero__title {
	margin: 0 0 0.4rem;
	font-size: clamp(1.45rem, 3vw, 1.9rem);
	font-weight: 800;
	line-height: 1.35;
	color: #fff;
}

.ecowise-checkout-hero__text {
	margin: 0;
	max-width: 36rem;
	font-size: 0.98rem;
	line-height: 1.7;
	opacity: 0.95;
}

.ecowise-checkout-shell {
	border-radius: 24px;
	border: 1px solid var(--hamrah-border, #e8e8e8);
	background: #fff;
	padding: 1.5rem 1.35rem 1.75rem;
	box-shadow: 0 16px 48px rgba(31, 42, 61, 0.08);
}

.ecowise-checkout-shell .woocommerce {
	margin: 0;
}

.ecowise-checkout-shell .woocommerce-NoticeGroup,
.ecowise-checkout-shell .woocommerce-notices-wrapper {
	margin-bottom: 1rem;
}

.ecowise-checkout-shell .woocommerce-info,
.ecowise-checkout-shell .woocommerce-message,
.ecowise-checkout-shell .woocommerce-error {
	border-radius: 14px;
	border: 0;
	padding: 0.95rem 1.1rem;
	list-style: none;
}

.ecowise-checkout-shell .woocommerce-info {
	background: var(--hamrah-peach, #fff3ea);
	color: var(--hamrah-ink, #1f2a3d);
}

.ecowise-checkout-shell .woocommerce-message {
	background: #dcfce7;
	color: #166534;
}

.ecowise-checkout-shell .woocommerce-error {
	background: #fee2e2;
	color: #991b1b;
}

/* Layout: billing + order */
.ecowise-checkout-shell .woocommerce-checkout {
	display: grid;
	gap: 1.5rem;
}

@media (min-width: 900px) {
	.ecowise-checkout-shell form.checkout.woocommerce-checkout {
		display: grid;
		grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
		gap: 1.75rem;
		align-items: start;
	}

	.ecowise-checkout-shell #customer_details {
		grid-column: 1;
	}

	.ecowise-checkout-shell #order_review_heading,
	.ecowise-checkout-shell #order_review {
		grid-column: 2;
	}

	.ecowise-checkout-shell #order_review_heading {
		grid-row: 1;
		margin-top: 0;
	}

	.ecowise-checkout-shell #order_review {
		grid-row: 2;
	}
}

.ecowise-checkout-shell .col2-set {
	width: 100%;
	float: none;
}

.ecowise-checkout-shell .col2-set .col-1,
.ecowise-checkout-shell .col2-set .col-2 {
	width: 100%;
	float: none;
	max-width: none;
}

.ecowise-checkout-shell .woocommerce-billing-fields h3,
.ecowise-checkout-shell .woocommerce-shipping-fields h3,
.ecowise-checkout-shell .woocommerce-additional-fields h3,
.ecowise-checkout-shell #order_review_heading {
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
	font-size: 1.15rem;
	font-weight: 800;
	color: var(--hamrah-ink, #1f2a3d);
}

.ecowise-checkout-shell .form-row {
	margin: 0 0 0.9rem;
	padding: 0;
}

.ecowise-checkout-shell .form-row label {
	display: block;
	margin-bottom: 0.35rem;
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--hamrah-ink, #1f2a3d);
}

.ecowise-checkout-shell .form-row label .required {
	color: var(--hamrah-orange-deep, #ff800c);
	text-decoration: none;
}

.ecowise-checkout-shell .form-row input.input-text,
.ecowise-checkout-shell .form-row textarea,
.ecowise-checkout-shell .form-row select,
.ecowise-checkout-shell .select2-container .select2-selection--single {
	width: 100%;
	min-height: 48px;
	border-radius: 14px !important;
	border: 1px solid var(--hamrah-border, #e8e8e8) !important;
	background: #fff !important;
	padding: 0.7rem 1rem !important;
	box-shadow: none !important;
	font-size: 0.95rem;
	color: var(--hamrah-ink, #1f2a3d);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ecowise-checkout-shell .form-row textarea {
	min-height: 96px;
}

.ecowise-checkout-shell .form-row input.input-text:focus,
.ecowise-checkout-shell .form-row textarea:focus,
.ecowise-checkout-shell .form-row select:focus {
	outline: none;
	border-color: var(--hamrah-orange, #ff914d) !important;
	box-shadow: 0 0 0 3px rgba(255, 145, 77, 0.18) !important;
}

.ecowise-checkout-shell .select2-container .select2-selection--single .select2-selection__rendered {
	line-height: 48px !important;
	padding: 0 !important;
}

.ecowise-checkout-shell .select2-container .select2-selection--single .select2-selection__arrow {
	height: 46px !important;
}

/* Order summary card */
.ecowise-checkout-shell #order_review_heading {
	margin-bottom: 0.75rem;
}

.ecowise-checkout-shell #order_review {
	border-radius: 20px;
	border: 1px solid var(--hamrah-border, #e8e8e8);
	background: linear-gradient(180deg, #fffaf6 0%, #fff 42%);
	padding: 1.15rem 1.1rem 1.25rem;
	box-shadow: 0 10px 28px rgba(255, 115, 0, 0.08);
}

.ecowise-checkout-shell .woocommerce-checkout-review-order-table {
	width: 100%;
	margin: 0 0 1.1rem;
	border-collapse: collapse;
}

.ecowise-checkout-shell .woocommerce-checkout-review-order-table th,
.ecowise-checkout-shell .woocommerce-checkout-review-order-table td {
	padding: 0.7rem 0.15rem;
	border: 0;
	border-bottom: 1px solid #f0e6dc;
	font-size: 0.95rem;
	vertical-align: middle;
}

.ecowise-checkout-shell .woocommerce-checkout-review-order-table thead th {
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--hamrah-muted, #7a7a7a);
	text-transform: none;
}

.ecowise-checkout-shell .woocommerce-checkout-review-order-table tfoot th {
	font-weight: 600;
	color: var(--hamrah-muted, #7a7a7a);
	text-align: right;
}

.ecowise-checkout-shell .woocommerce-checkout-review-order-table tfoot .order-total th,
.ecowise-checkout-shell .woocommerce-checkout-review-order-table tfoot .order-total td {
	border-bottom: 0;
	padding-top: 1rem;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--hamrah-ink, #1f2a3d);
}

.ecowise-checkout-shell .woocommerce-checkout-review-order-table .amount {
	font-weight: 800;
	color: var(--hamrah-orange-deep, #ff800c);
	white-space: nowrap;
}

/* ── Payment box (main focus) ── */
.ecowise-checkout-shell #payment {
	margin: 0;
	border: 0 !important;
	border-radius: 18px !important;
	background: transparent !important;
	box-shadow: none !important;
}

.ecowise-checkout-shell #payment .wc_payment_methods,
.ecowise-checkout-shell #payment ul.payment_methods {
	margin: 0 0 1rem !important;
	padding: 0 !important;
	border: 0 !important;
	list-style: none !important;
	display: grid;
	gap: 0.65rem;
	background: transparent !important;
}

.ecowise-checkout-shell #payment ul.payment_methods li,
.ecowise-checkout-shell #payment .wc_payment_method {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	list-style: none !important;
}

.ecowise-checkout-shell #payment ul.payment_methods li > label,
.ecowise-checkout-shell #payment .wc_payment_method > label {
	display: flex !important;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	margin: 0 !important;
	padding: 0.95rem 1rem !important;
	border-radius: 14px;
	border: 1.5px solid #edd9c8;
	background: #fff;
	cursor: pointer;
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--hamrah-ink, #1f2a3d);
	transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.ecowise-checkout-shell #payment ul.payment_methods li > label:hover,
.ecowise-checkout-shell #payment .wc_payment_method > label:hover {
	border-color: var(--hamrah-orange, #ff914d);
	background: var(--hamrah-peach, #fff3ea);
}

.ecowise-checkout-shell #payment ul.payment_methods li input[type="radio"],
.ecowise-checkout-shell #payment .wc_payment_method input[type="radio"] {
	width: 1.15rem;
	height: 1.15rem;
	margin: 0;
	accent-color: var(--hamrah-orange-deep, #ff800c);
	flex-shrink: 0;
}

.ecowise-checkout-shell #payment ul.payment_methods li.wc_payment_method > input[type="radio"]:checked + label,
.ecowise-checkout-shell #payment .wc_payment_method > input[type="radio"]:checked + label,
.ecowise-checkout-shell #payment li.payment_method_selected > label {
	border-color: var(--hamrah-orange-deep, #ff800c);
	background: linear-gradient(135deg, #fff7ef 0%, #ffe8d4 100%);
	box-shadow: 0 8px 22px rgba(255, 115, 0, 0.14);
}

.ecowise-checkout-shell #payment div.payment_box {
	margin: 0.55rem 0 0.15rem !important;
	padding: 0.95rem 1rem !important;
	border-radius: 14px !important;
	border: 1px solid #f0dcc8 !important;
	background: var(--hamrah-peach, #fff3ea) !important;
	color: var(--hamrah-ink, #1f2a3d) !important;
	font-size: 0.9rem;
	line-height: 1.7;
	position: relative;
	box-shadow: none !important;
}

.ecowise-checkout-shell #payment div.payment_box::before {
	display: none !important;
}

.ecowise-checkout-shell #payment div.payment_box p {
	margin: 0;
}

.ecowise-checkout-shell #payment div.form-row.place-order {
	margin: 1.15rem 0 0 !important;
	padding: 1.1rem 0 0 !important;
	border-top: 1px dashed #edd9c8;
	float: none !important;
	width: 100% !important;
}

.ecowise-checkout-shell #payment #place_order,
.ecowise-checkout-shell #payment button#place_order {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	margin: 0.85rem 0 0 !important;
	padding: 0.95rem 1.25rem !important;
	border: 0 !important;
	border-radius: 14px !important;
	background: var(--hamrah-orange-deep, #ff800c) !important;
	color: #fff !important;
	font-size: 1.05rem !important;
	font-weight: 800 !important;
	line-height: 1.4 !important;
	cursor: pointer;
	box-shadow: 0 12px 28px rgba(255, 115, 0, 0.28) !important;
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.ecowise-checkout-shell #payment #place_order:hover,
.ecowise-checkout-shell #payment button#place_order:hover {
	background: var(--hamrah-orange-dark, #e86f00) !important;
	transform: translateY(-1px);
	box-shadow: 0 16px 32px rgba(255, 115, 0, 0.34) !important;
}

.ecowise-checkout-shell #payment .woocommerce-terms-and-conditions-wrapper,
.ecowise-checkout-shell #payment .woocommerce-privacy-policy-text {
	font-size: 0.84rem;
	line-height: 1.65;
	color: var(--hamrah-muted, #7a7a7a);
}

.ecowise-checkout-shell #payment .woocommerce-privacy-policy-text a {
	color: var(--hamrah-orange-deep, #ff800c);
	font-weight: 600;
}

/* Block checkout (if used) */
.ecowise-checkout-shell .wc-block-checkout,
.ecowise-checkout-shell .wp-block-woocommerce-checkout {
	max-width: none;
}

.ecowise-checkout-shell .wc-block-components-radio-control-accordion-option,
.ecowise-checkout-shell .wc-block-components-radio-control__option {
	border-radius: 14px !important;
	border-color: #edd9c8 !important;
}

.ecowise-checkout-shell .wc-block-components-checkout-place-order-button,
.ecowise-checkout-shell .wc-block-components-button {
	border-radius: 14px !important;
	background: var(--hamrah-orange-deep, #ff800c) !important;
	color: #fff !important;
	font-weight: 800 !important;
}

/* Login gate when redirected from checkout */
.ecowise-auth--checkout {
	min-height: 68vh;
	padding-top: 1.5rem;
	padding-bottom: 3rem;
}

.ecowise-auth--checkout .ecowise-auth__card {
	max-width: 440px;
	border: 1px solid #edd9c8;
	border-radius: 24px;
	padding: 1.75rem 1.5rem 1.6rem;
	background: linear-gradient(180deg, #fffaf6 0%, #fff 45%);
	box-shadow: 0 18px 48px rgba(255, 115, 0, 0.12);
}

.ecowise-auth--checkout .ecowise-auth__badge {
	display: inline-flex;
	margin-bottom: 0.75rem;
	padding: 0.3rem 0.75rem;
	border-radius: 999px;
	background: var(--hamrah-peach, #fff3ea);
	color: var(--hamrah-orange-deep, #ff800c);
	font-size: 0.78rem;
	font-weight: 800;
}

.ecowise-auth--checkout .ecowise-auth__card h1 {
	margin: 0 0 0.45rem;
	font-size: 1.45rem;
	font-weight: 800;
	color: var(--hamrah-ink, #1f2a3d);
}

.ecowise-auth--checkout .ecowise-auth__lead {
	margin: 0 0 1.25rem;
	color: var(--hamrah-muted, #7a7a7a);
	font-size: 0.95rem;
	line-height: 1.7;
}

.ecowise-auth--checkout .ecowise-form__field {
	margin-bottom: 0.9rem;
}

.ecowise-auth--checkout .ecowise-form__field input {
	border-radius: 14px;
	border: 1px solid var(--hamrah-border, #e8e8e8);
	padding: 0.8rem 1rem;
	min-height: 48px;
}

.ecowise-auth--checkout .ecowise-form__field input:focus {
	outline: none;
	border-color: var(--hamrah-orange, #ff914d);
	box-shadow: 0 0 0 3px rgba(255, 145, 77, 0.18);
}

.ecowise-auth--checkout .ecowise-btn--accent {
	margin-top: 0.35rem;
	border-radius: 14px;
	min-height: 50px;
	font-weight: 800;
	box-shadow: 0 12px 28px rgba(255, 115, 0, 0.28);
}

@media (max-width: 640px) {
	.ecowise-checkout-hero {
		padding: 1.35rem 1.15rem;
		border-radius: 20px;
	}

	.ecowise-checkout-shell {
		padding: 1.15rem 0.95rem 1.35rem;
		border-radius: 20px;
	}

	.ecowise-checkout-shell #order_review {
		padding: 1rem 0.9rem 1.1rem;
	}
}

/* English LTR checkout */
html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-hero,
html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-shell,
html[dir="ltr"] body.ecowise-ltr .ecowise-page--checkout,
html[dir="ltr"] body.ecowise-ltr .ecowise-auth--checkout {
	direction: ltr !important;
	text-align: left !important;
}

html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-hero *,
html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-shell *:not(script):not(style):not(svg):not(path) {
	direction: inherit !important;
}

html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-hero,
html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-shell .form-row,
html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-shell label,
html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-shell th,
html[dir="ltr"] body.ecowise-ltr .ecowise-checkout-shell td {
	text-align: left !important;
}
