/**
 * Classic WooCommerce checkout (form.checkout) — Lovable field spacing and order review card.
 */

body.theme-checkout .theme-checkout-content .woocommerce,
body.woocommerce-checkout .theme-checkout-content .woocommerce {
	max-width: none;
	width: 100%;
}

body.theme-checkout form.checkout .woocommerce-form-coupon-toggle,
body.woocommerce-checkout form.checkout .woocommerce-form-coupon-toggle {
	margin: 0 0 1.5rem;
	font-size: 15px;
	color: hsl(var(--foreground) / 0.75);
}

body.theme-checkout form.checkout .woocommerce-form-coupon-toggle a,
body.woocommerce-checkout form.checkout .woocommerce-form-coupon-toggle a {
	color: hsl(var(--primary));
	text-decoration: none;
}

body.theme-checkout form.checkout .woocommerce-form-coupon-toggle a:hover,
body.woocommerce-checkout form.checkout .woocommerce-form-coupon-toggle a:hover {
	text-decoration: underline;
}

body.theme-checkout form.checkout #customer_details .col-1,
body.theme-checkout form.checkout #customer_details .col-2,
body.woocommerce-checkout form.checkout #customer_details .col-1,
body.woocommerce-checkout form.checkout #customer_details .col-2 {
	width: 100%;
	float: none;
	padding: 0;
}

body.theme-checkout form.checkout .theme-checkout-fields-column,
body.woocommerce-checkout form.checkout .theme-checkout-fields-column {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
	width: 100%;
}

body.theme-checkout form.checkout #customer_details.col2-set,
body.woocommerce-checkout form.checkout #customer_details.col2-set {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
	width: 100%;
	margin: 0;
}

body.theme-checkout form.checkout #customer_details .col-1,
body.theme-checkout form.checkout #customer_details .col-2,
body.woocommerce-checkout form.checkout #customer_details .col-1,
body.woocommerce-checkout form.checkout #customer_details .col-2 {
	width: 100%;
	float: none;
	padding: 0;
}

body.theme-checkout form.checkout .woocommerce-billing-fields,
body.theme-checkout form.checkout .woocommerce-shipping-fields,
body.theme-checkout form.checkout .woocommerce-additional-fields,
body.woocommerce-checkout form.checkout .woocommerce-billing-fields,
body.woocommerce-checkout form.checkout .woocommerce-shipping-fields,
body.woocommerce-checkout form.checkout .woocommerce-additional-fields {
	margin: 0;
	padding: 0;
}

body.theme-checkout .theme-checkout-section__title,
body.woocommerce-checkout .theme-checkout-section__title {
	font-family: 'Anton', 'Baloo 2', system-ui, sans-serif;
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 2rem;
	letter-spacing: -0.01em;
	color: hsl(var(--foreground));
	margin: 0 0 1.25rem;
	padding: 0;
}

body.theme-checkout .theme-checkout-section,
body.woocommerce-checkout .theme-checkout-section {
	margin: 0;
}

body.theme-checkout .woocommerce-billing-fields,
body.woocommerce-checkout .woocommerce-billing-fields {
	display: flex;
	flex-direction: column;
	gap: 2.5rem;
}

body.theme-checkout .theme-checkout-section + .theme-checkout-section,
body.woocommerce-checkout .theme-checkout-section + .theme-checkout-section {
	margin-top: 0;
}

body.theme-checkout .theme-checkout-ship-toggle,
body.woocommerce-checkout .theme-checkout-ship-toggle {
	font-family: var(--font-body, 'Outfit', system-ui, sans-serif);
	font-size: 15px;
	font-weight: 400;
	margin: 0 0 1rem;
}

body.theme-checkout .theme-checkout-fields--contact,
body.woocommerce-checkout form.checkout .theme-checkout-fields--contact {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem;
	width: 100%;
}

body.theme-checkout .theme-checkout-fields--address,
body.theme-checkout .theme-checkout-fields--notes,
body.woocommerce-checkout form.checkout .theme-checkout-fields--address,
body.woocommerce-checkout form.checkout .theme-checkout-fields--notes {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.75rem;
	width: 100%;
}

body.theme-checkout .theme-checkout-fields--notes,
body.woocommerce-checkout form.checkout .theme-checkout-fields--notes {
	grid-template-columns: 1fr;
}

body.theme-checkout form.checkout .form-row,
body.woocommerce-checkout form.checkout .form-row {
	width: 100% !important;
	float: none !important;
	clear: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.theme-checkout .theme-checkout-field--full,
body.theme-checkout form.checkout #billing_email_field,
body.theme-checkout form.checkout #billing_phone_field,
body.theme-checkout form.checkout #billing_address_1_field,
body.theme-checkout form.checkout #billing_address_2_field,
body.theme-checkout form.checkout #billing_country_field,
body.theme-checkout form.checkout #order_comments_field,
body.woocommerce-checkout .theme-checkout-field--full,
body.woocommerce-checkout form.checkout #billing_email_field,
body.woocommerce-checkout form.checkout #billing_phone_field,
body.woocommerce-checkout form.checkout #billing_address_1_field,
body.woocommerce-checkout form.checkout #billing_address_2_field,
body.woocommerce-checkout form.checkout #billing_country_field,
body.woocommerce-checkout form.checkout #order_comments_field {
	grid-column: 1 / -1;
}

body.theme-checkout .theme-checkout-field--city,
body.theme-checkout form.checkout #billing_city_field,
body.woocommerce-checkout .theme-checkout-field--city,
body.woocommerce-checkout form.checkout #billing_city_field {
	grid-column: span 2;
}

body.theme-checkout .theme-checkout-field--state,
body.theme-checkout form.checkout #billing_state_field,
body.woocommerce-checkout .theme-checkout-field--state,
body.woocommerce-checkout form.checkout #billing_state_field {
	grid-column: span 2;
}

body.theme-checkout .theme-checkout-field--postcode,
body.theme-checkout form.checkout #billing_postcode_field,
body.woocommerce-checkout .theme-checkout-field--postcode,
body.woocommerce-checkout form.checkout #billing_postcode_field {
	grid-column: span 2;
}

body.theme-checkout form.checkout .shipping_address .form-row-wide,
body.woocommerce-checkout form.checkout .shipping_address .form-row-wide {
	grid-column: 1 / -1;
}

body.theme-checkout form.checkout .form-row label,
body.woocommerce-checkout form.checkout .form-row label {
	display: block;
	margin-bottom: 0.35rem;
	font-family: var(--font-body, 'Outfit', system-ui, sans-serif);
	font-size: 14px;
	font-weight: 400;
	color: hsl(var(--foreground) / 0.65);
	line-height: 1.4;
}

body.theme-checkout form.checkout .form-row .required,
body.woocommerce-checkout form.checkout .form-row .required {
	color: hsl(var(--destructive));
	text-decoration: none;
}

body.theme-checkout form.checkout .form-row .input-text,
body.theme-checkout form.checkout .form-row select,
body.theme-checkout form.checkout .form-row textarea,
body.woocommerce-checkout form.checkout .form-row .input-text,
body.woocommerce-checkout form.checkout .form-row select,
body.woocommerce-checkout form.checkout .form-row textarea {
	display: block;
	width: 100% !important;
	box-sizing: border-box;
	min-height: 3rem;
	padding: 0 1rem !important;
	margin: 0;
	font-family: var(--font-body, 'Outfit', system-ui, sans-serif);
	font-size: 15px;
	line-height: 1.4;
	color: hsl(var(--foreground));
	background-color: hsl(var(--ivory)) !important;
	border: 1px solid hsl(var(--foreground) / 0.15) !important;
	border-radius: calc(var(--radius) - 4px);
	box-shadow: none !important;
	transition: border-color 0.15s ease;
}

body.theme-checkout form.checkout .form-row textarea,
body.woocommerce-checkout form.checkout .form-row textarea {
	min-height: 6.5rem;
	resize: vertical;
}

body.theme-checkout form.checkout #order_comments,
body.theme-checkout form.checkout .theme-checkout-fields--notes textarea,
body.woocommerce-checkout form.checkout #order_comments,
body.woocommerce-checkout form.checkout .theme-checkout-fields--notes textarea {
	min-height: 7rem;
	padding: 0.75rem 1rem !important;
	line-height: 1.5;
	vertical-align: top;
}

body.theme-checkout form.checkout .form-row .input-text:focus,
body.theme-checkout form.checkout .form-row select:focus,
body.theme-checkout form.checkout .form-row textarea:focus,
body.woocommerce-checkout form.checkout .form-row .input-text:focus,
body.woocommerce-checkout form.checkout .form-row select:focus,
body.woocommerce-checkout form.checkout .form-row textarea:focus {
	outline: none;
	border-color: hsl(var(--primary)) !important;
}

body.theme-checkout form.checkout .select2-container .select2-selection--single,
body.woocommerce-checkout form.checkout .select2-container .select2-selection--single {
	min-height: 3rem;
	height: 3rem !important;
	border: 1px solid hsl(var(--foreground) / 0.15) !important;
	border-radius: calc(var(--radius) - 4px);
	background-color: hsl(var(--ivory)) !important;
}

body.theme-checkout form.checkout .select2-container--default .select2-selection--single .select2-selection__rendered,
body.woocommerce-checkout form.checkout .select2-container--default .select2-selection--single .select2-selection__rendered {
	line-height: 3rem;
	padding-left: 1rem;
	font-size: 15px;
	color: hsl(var(--foreground));
}

body.theme-checkout form.checkout .select2-container--default .select2-selection--single .select2-selection__arrow,
body.woocommerce-checkout form.checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 3rem;
}

body.theme-checkout .select2-container,
body.woocommerce-checkout .select2-container {
	z-index: 100;
}

body.theme-checkout .select2-container--open,
body.woocommerce-checkout .select2-container--open {
	z-index: 10050;
}

body.theme-checkout .select2-dropdown,
body.woocommerce-checkout .select2-dropdown {
	z-index: 10050 !important;
	border-color: hsl(var(--foreground) / 0.15);
	border-radius: calc(var(--radius) - 4px);
	overflow: hidden;
}

body.theme-checkout .select2-results__options,
body.woocommerce-checkout .select2-results__options {
	max-height: 240px !important;
	overflow-y: auto !important;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

body.theme-checkout form.checkout .woocommerce-additional-fields__field-wrapper,
body.woocommerce-checkout form.checkout .woocommerce-additional-fields__field-wrapper {
	margin-top: 0;
}

/* Order review column */
body.theme-checkout form.checkout .theme-checkout-order-review,
body.woocommerce-checkout form.checkout .theme-checkout-order-review {
	background-color: hsl(var(--linen));
	border: 1px solid hsl(var(--foreground) / 0.1);
	border-radius: 1rem;
	padding: 1.5rem;
}

@media (min-width: 1024px) {
	body.theme-checkout form.checkout .theme-checkout-order-review,
	body.woocommerce-checkout form.checkout .theme-checkout-order-review {
		position: sticky;
		top: var(--checkout-sticky-top, 7rem);
		padding: 1.75rem;
	}
}

body.theme-checkout form.checkout #order_review_heading,
body.woocommerce-checkout form.checkout #order_review_heading {
	font-family: 'Anton', 'Baloo 2', system-ui, sans-serif;
	font-weight: 400;
	font-size: 1.5rem;
	line-height: 2rem;
	letter-spacing: -0.01em;
	color: hsl(var(--foreground));
	margin: 0 0 1.5rem !important;
	padding: 0;
}

body.theme-checkout .theme-checkout-order-line,
body.woocommerce-checkout .theme-checkout-order-line {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	text-align: left;
}

body.theme-checkout .theme-checkout-item-thumb-link,
body.woocommerce-checkout .theme-checkout-item-thumb-link {
	flex-shrink: 0;
	position: relative;
	display: block;
	width: 5rem;
	height: 6rem;
	border-radius: calc(var(--radius) - 4px);
	overflow: hidden;
	background-color: hsl(var(--ivory));
}

body.theme-checkout .theme-checkout-item-thumb-link .theme-checkout-item-thumb,
body.woocommerce-checkout .theme-checkout-item-thumb-link .theme-checkout-item-thumb,
body.theme-checkout img.theme-checkout-item-thumb,
body.woocommerce-checkout img.theme-checkout-item-thumb {
	position: absolute;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	object-position: center;
	display: block;
}

body.theme-checkout .theme-checkout-order-line__text,
body.woocommerce-checkout .theme-checkout-order-line__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
}

body.theme-checkout .theme-checkout-order-line__title,
body.woocommerce-checkout .theme-checkout-order-line__title {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.4;
	width: 100%;
}

body.theme-checkout .theme-checkout-order-line__title a,
body.woocommerce-checkout .theme-checkout-order-line__title a {
	color: hsl(var(--foreground));
	text-decoration: none;
}

body.theme-checkout .theme-checkout-order-line__title a:hover,
body.woocommerce-checkout .theme-checkout-order-line__title a:hover {
	color: hsl(var(--primary));
}

body.theme-checkout .theme-checkout-order-line__details,
body.woocommerce-checkout .theme-checkout-order-line__details {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.75rem;
	margin-top: 0.25rem;
	font-size: 15px;
	line-height: 1.4;
	color: hsl(var(--foreground) / 0.75);
}

body.theme-checkout .theme-checkout-item-unit-price,
body.woocommerce-checkout .theme-checkout-item-unit-price {
	font-weight: 400;
	color: hsl(var(--foreground) / 0.75);
}

body.theme-checkout .theme-checkout-item-qty,
body.woocommerce-checkout .theme-checkout-item-qty {
	font-weight: 400;
	color: hsl(var(--foreground) / 0.75);
}

body.theme-checkout .theme-checkout-item-qty .product-quantity,
body.woocommerce-checkout .theme-checkout-item-qty .product-quantity {
	font-weight: 400;
}

body.theme-checkout .theme-checkout-item-meta,
body.woocommerce-checkout .theme-checkout-item-meta {
	display: block;
	margin-top: 0.25rem;
	font-size: 14px;
	font-weight: 400;
	color: hsl(var(--foreground) / 0.75);
}

body.theme-checkout .theme-checkout-order-review .woocommerce-checkout-review-order-table thead,
body.woocommerce-checkout .theme-checkout-order-review .woocommerce-checkout-review-order-table thead {
	display: none;
}

body.theme-checkout .theme-checkout-order-review .woocommerce-checkout-review-order-table .product-name,
body.woocommerce-checkout .theme-checkout-order-review .woocommerce-checkout-review-order-table .product-name {
	width: auto;
	padding-right: 1rem;
}

body.theme-checkout .theme-checkout-policy-note,
body.woocommerce-checkout .theme-checkout-policy-note {
	margin: 1rem 0 0;
	text-align: center;
	font-size: 15px;
	line-height: 1.625;
	color: hsl(var(--foreground) / 0.7);
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px) !important;
	clip-path: inset(50%);
	height: 1px !important;
	width: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	position: absolute !important;
	word-wrap: normal !important;
}

body.theme-checkout form.checkout #order_review,
body.woocommerce-checkout form.checkout #order_review {
	margin: 0 !important;
	padding: 0;
	background: transparent;
	border: 0;
}

body.theme-checkout form.checkout .woocommerce-checkout-review-order-table,
body.woocommerce-checkout form.checkout .woocommerce-checkout-review-order-table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.25rem;
	font-size: 15px;
}

body.theme-checkout form.checkout .woocommerce-checkout-review-order-table th,
body.theme-checkout form.checkout .woocommerce-checkout-review-order-table td,
body.woocommerce-checkout form.checkout .woocommerce-checkout-review-order-table th,
body.woocommerce-checkout form.checkout .woocommerce-checkout-review-order-table td {
	padding: 0.65rem 0;
	border-bottom: 1px solid hsl(var(--foreground) / 0.1);
	vertical-align: top;
}

body.theme-checkout form.checkout .woocommerce-checkout-review-order-table thead th,
body.woocommerce-checkout form.checkout .woocommerce-checkout-review-order-table thead th {
	font-weight: 500;
	color: hsl(var(--foreground) / 0.75);
}

body.theme-checkout form.checkout .woocommerce-checkout-review-order-table .product-total,
body.woocommerce-checkout form.checkout .woocommerce-checkout-review-order-table .product-total {
	text-align: right;
}

body.theme-checkout form.checkout .woocommerce-checkout-review-order-table tfoot th,
body.woocommerce-checkout form.checkout .woocommerce-checkout-review-order-table tfoot th {
	text-align: left;
	font-weight: 400;
	color: hsl(var(--foreground) / 0.75);
}

body.theme-checkout form.checkout .woocommerce-checkout-review-order-table tfoot td,
body.woocommerce-checkout form.checkout .woocommerce-checkout-review-order-table tfoot td {
	text-align: right;
	font-weight: 500;
	color: hsl(var(--foreground));
}

body.theme-checkout form.checkout #payment,
body.woocommerce-checkout form.checkout #payment {
	background: transparent;
	border-radius: 0;
	margin-top: 1rem;
}

body.theme-checkout form.checkout #payment ul.payment_methods,
body.woocommerce-checkout form.checkout #payment ul.payment_methods {
	padding: 0;
	border: 0;
	margin: 0 0 1rem;
}

body.theme-checkout form.checkout #payment .form-row.place-order,
body.woocommerce-checkout form.checkout #payment .form-row.place-order {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
}

body.theme-checkout form.checkout .woocommerce-terms-and-conditions-wrapper,
body.woocommerce-checkout form.checkout .woocommerce-terms-and-conditions-wrapper {
	margin: 0;
}

body.theme-checkout form.checkout .woocommerce-privacy-policy-text,
body.woocommerce-checkout form.checkout .woocommerce-privacy-policy-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: hsl(var(--foreground) / 0.7);
}

body.theme-checkout form.checkout .woocommerce-privacy-policy-text p,
body.woocommerce-checkout form.checkout .woocommerce-privacy-policy-text p {
	margin: 0;
}

body.theme-checkout form.checkout #place_order,
body.woocommerce-checkout form.checkout #place_order {
	width: 100%;
	min-height: 3rem;
	border-radius: 9999px;
	font-family: var(--font-body, 'Outfit', system-ui, sans-serif);
	font-size: 15px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: normal;
	background-color: hsl(var(--primary)) !important;
	color: hsl(var(--primary-foreground)) !important;
	border: 1px solid hsl(var(--primary)) !important;
}

body.theme-checkout form.checkout #place_order:hover,
body.woocommerce-checkout form.checkout #place_order:hover {
	background-color: hsl(var(--primary) / 0.9) !important;
}

@media (max-width: 639px) {
	body.theme-checkout .theme-checkout-fields--contact,
	body.theme-checkout .theme-checkout-fields--address,
	body.woocommerce-checkout form.checkout .theme-checkout-fields--contact,
	body.woocommerce-checkout form.checkout .theme-checkout-fields--address {
		grid-template-columns: 1fr;
	}

	body.theme-checkout .theme-checkout-field--city,
	body.theme-checkout .theme-checkout-field--state,
	body.theme-checkout .theme-checkout-field--postcode,
	body.theme-checkout form.checkout #billing_city_field,
	body.theme-checkout form.checkout #billing_state_field,
	body.theme-checkout form.checkout #billing_postcode_field,
	body.woocommerce-checkout .theme-checkout-field--city,
	body.woocommerce-checkout .theme-checkout-field--state,
	body.woocommerce-checkout .theme-checkout-field--postcode,
	body.woocommerce-checkout form.checkout #billing_city_field,
	body.woocommerce-checkout form.checkout #billing_state_field,
	body.woocommerce-checkout form.checkout #billing_postcode_field {
		grid-column: 1 / -1;
	}
}
