/**
 * Popbag WooCommerce checkout/cart/order summary styles (scoped by enqueue).
 *
 * Woo default styles are disabled in theme integration.
 * This file restores a consistent UI on checkout-related pages and aligns CTA buttons with theme style.
 */

:where(.woocommerce, .woocommerce-page) :where(a.button, button.button, input.button, .woocommerce-button, .wc-backward, .wc-forward, #payment #place_order) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	border-radius: 9999px;
	border: 1px solid rgba(0, 55, 69, 0.15);
	background: #fff;
	color: #003745;
	padding: 0.75rem 1.5rem;
	font-size: 0.75rem;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-decoration: none;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

:where(.woocommerce, .woocommerce-page) :where(a.button.alt, button.button.alt, input.button.alt, .checkout-button, .wc-forward, #payment #place_order) {
	border-color: #ff2030;
	background: #ff2030;
	color: #fff;
}

:where(.woocommerce, .woocommerce-page) :where(a.button, button.button, input.button, .woocommerce-button, .wc-backward, .wc-forward, #payment #place_order):not(:disabled):not(.disabled):hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

:where(.woocommerce, .woocommerce-page) :where(a.button:not(.alt), button.button:not(.alt), input.button:not(.alt), .woocommerce-button:not(.alt), .wc-backward):not(:disabled):not(.disabled):hover {
	border-color: rgba(0, 55, 69, 0.45);
}

:where(.woocommerce, .woocommerce-page) :where(a.button, button.button, input.button, .woocommerce-button, .wc-backward, .wc-forward, #payment #place_order):focus-visible {
	outline: 2px solid #003745;
	outline-offset: 2px;
}

:where(.woocommerce, .woocommerce-page) :where(a.button, button.button, input.button, .woocommerce-button, .wc-backward, .wc-forward, #payment #place_order).disabled,
:where(.woocommerce, .woocommerce-page) :where(a.button, button.button, input.button, .woocommerce-button, .wc-backward, .wc-forward, #payment #place_order):disabled,
:where(.woocommerce, .woocommerce-page) :where(a.button, button.button, input.button, .woocommerce-button, .wc-backward, .wc-forward, #payment #place_order)[disabled] {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
	transform: none;
	box-shadow: none;
}

.woocommerce-checkout #payment #place_order {
	width: 100%;
}

.woocommerce :where(form.checkout_coupon, .woocommerce-form-coupon) {
	margin: 1rem 0 1.25rem;
	padding: 1rem;
	border: 1px solid rgba(0, 55, 69, 0.1);
	border-radius: 16px;
	background: #fff;
}

.woocommerce :where(form.checkout_coupon, .woocommerce-form-coupon) :where(.form-row-first, .form-row-last) {
	float: none;
	width: 100%;
	margin: 0;
}

.woocommerce :where(form.checkout_coupon, .woocommerce-form-coupon) p {
	margin: 0;
}

.woocommerce-cart .woocommerce-cart-form .coupon {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
}

.woocommerce-cart .woocommerce-cart-form .coupon #coupon_code {
	width: min(100%, 18rem);
	min-height: 2.75rem;
}

.woocommerce :where(ul#shipping_method, ul.woocommerce-shipping-methods) {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.5rem;
}

.woocommerce :where(ul#shipping_method, ul.woocommerce-shipping-methods) li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	color: #1f525e;
}

.woocommerce :where(ul#shipping_method, ul.woocommerce-shipping-methods) input[type='radio'] {
	width: auto;
	margin-top: 0.2rem;
}

.woocommerce-checkout #payment {
	margin: 0;
	border: 1px solid rgba(0, 55, 69, 0.1);
	border-radius: 16px;
	background: #fff;
	color: #003745;
}

.woocommerce-checkout #payment ul.payment_methods {
	margin: 0;
	padding: 1rem;
	border-bottom: 1px solid rgba(0, 55, 69, 0.1);
	list-style: none;
	display: grid;
	gap: 0.75rem;
}

.woocommerce-checkout #payment ul.payment_methods > li {
	margin: 0;
	padding: 0.85rem 1rem;
	border: 1px solid rgba(0, 55, 69, 0.1);
	border-radius: 14px;
	background: #fff;
}

.woocommerce-checkout #payment ul.payment_methods > li > label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
	color: #003745;
	font-weight: 600;
}

.woocommerce-checkout #payment ul.payment_methods > li img {
	display: inline-block;
	vertical-align: middle;
}

.woocommerce-checkout #payment div.payment_box {
	margin: 0.75rem 0 0;
	padding: 0.75rem;
	border: 1px solid rgba(0, 55, 69, 0.1);
	border-radius: 12px;
	background: rgba(0, 55, 69, 0.04);
	color: #1f525e;
	font-size: 0.875rem;
	line-height: 1.45;
}

.woocommerce-checkout #payment div.payment_box::before {
	display: none;
}

.woocommerce-checkout #payment .form-row.place-order {
	margin: 0;
	padding: 1rem;
}

.woocommerce-checkout #payment .woocommerce-terms-and-conditions-wrapper {
	margin-bottom: 0.9rem;
	color: #1f525e;
	font-size: 0.875rem;
}

.woocommerce-checkout #payment .woocommerce-privacy-policy-text p {
	margin: 0;
}

.woocommerce .woocommerce-thankyou-order-received {
	margin: 1rem 0;
	color: #003745;
	font-weight: 700;
}

.woocommerce :where(ul.woocommerce-order-overview, .woocommerce-order-overview) {
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.75rem;
	grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.woocommerce :where(ul.woocommerce-order-overview, .woocommerce-order-overview) li {
	margin: 0;
	padding: 0.75rem 0.9rem;
	border: 1px solid rgba(0, 55, 69, 0.12);
	border-radius: 14px;
	background: rgba(0, 55, 69, 0.05);
	color: #1f525e;
	font-size: 0.72rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.14em;
}

.woocommerce :where(ul.woocommerce-order-overview, .woocommerce-order-overview) li strong {
	display: block;
	margin-top: 0.35rem;
	color: #003745;
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: normal;
	text-transform: none;
}

.woocommerce :where(.woocommerce-order-details__title, .woocommerce-order-downloads__title, .woocommerce-customer-details .woocommerce-column__title) {
	margin: 1.5rem 0 0.85rem;
	color: #003745;
	font-size: 1.12rem;
	font-weight: 900;
}

.woocommerce :where(table.shop_table, table.woocommerce-table) {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border: 1px solid rgba(0, 55, 69, 0.1);
	border-radius: 16px;
	overflow: hidden;
	font-size: 0.875rem;
}

.woocommerce :where(table.shop_table, table.woocommerce-table) thead th {
	padding: 0.8rem 0.95rem;
	background: rgba(0, 55, 69, 0.05);
	color: #1f525e;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
}

.woocommerce :where(table.shop_table, table.woocommerce-table) :where(td, th) {
	padding: 0.85rem 0.95rem;
	color: #003745;
}

.woocommerce :where(table.shop_table, table.woocommerce-table) tbody tr + tr :where(td, th),
.woocommerce :where(table.shop_table, table.woocommerce-table) tfoot tr :where(td, th) {
	border-top: 1px solid rgba(0, 55, 69, 0.1);
}

.woocommerce .woocommerce-customer-details address {
	margin: 0;
	padding: 1rem;
	border: 1px solid rgba(0, 55, 69, 0.12);
	border-radius: 14px;
	background: rgba(0, 55, 69, 0.05);
	color: #003745;
	font-style: normal;
	line-height: 1.6;
}

@media (min-width: 768px) {
	.woocommerce :where(form.checkout_coupon, .woocommerce-form-coupon) {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 0.75rem;
		align-items: end;
	}

	.woocommerce :where(form.checkout_coupon, .woocommerce-form-coupon) :where(.form-row-first, .form-row-last) {
		width: auto;
	}
}
