/* Shipment block sits outside the cart totals table to avoid Woodmart layout conflicts. */

.cart-totals-inner .tuan-cart-shipment-wrap {
	display: block;
	width: 100%;
	padding-block: 15px;
	border-bottom: 1px solid var(--brdcolor-gray-300, #e5e7eb);
}

.cart-totals-inner .tuan-cart-totals-table--top tr:last-child :is(th, td) {
	border-bottom: none;
}

.tuan-shipment-block {
	width: 100%;
}

.tuan-shipment-title {
	margin: 0 0 12px;
	color: #111827;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-align: left;
}

.tuan-shipment-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 14px;
}

.tuan-shipment-destination {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	color: #374151;
	font-size: 14px;
	line-height: 1.45;
}

.tuan-shipment-destination strong {
	color: #111827;
	font-weight: 600;
}

.tuan-shipping-calculator {
	flex: 0 0 auto;
	margin: 0;
}

.tuan-shipping-calculator-button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 !important;
	padding: 0;
	border: 0;
	background: none;
	color: #2563eb !important;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-decoration: none;
	white-space: nowrap;
}

.tuan-shipping-calculator-button:hover {
	color: #1d4ed8 !important;
}

.tuan-shipping-calculator-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
}

.tuan-shipping-calculator-icon svg {
	display: block;
	width: 14px;
	height: 14px;
	fill: currentColor;
}

.tuan-shipment-methods {
	--li-pl: 0;
	overflow: hidden;
	margin: 0;
	padding: 0;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	list-style: none;
	background: #fff;
}

.tuan-shipment-methods .shipping_method {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.tuan-shipment-method {
	position: relative;
	margin: 0;
}

.tuan-shipment-method + .tuan-shipment-method {
	border-top: 1px solid #e5e7eb;
}

.tuan-shipment-method-label {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 14px 16px;
	cursor: pointer;
}

.tuan-shipment-method-radio {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	border: 2px solid #d1d5db;
	border-radius: 50%;
	background: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tuan-shipment-method-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 42px;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #f3f4f6;
	color: #4b5563;
}

.tuan-shipment-method-copy {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.tuan-shipment-method-name {
	color: #111827;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.35;
}

.tuan-shipment-method-subtitle {
	color: #6b7280;
	font-size: 13px;
	line-height: 1.4;
}

.tuan-shipment-price {
	flex: 0 0 auto;
	margin-left: auto;
	color: #111827;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	text-align: right;
	white-space: nowrap;
}

.tuan-shipment-method.is-selected .tuan-shipment-method-label {
	background: #eff6ff;
	box-shadow: inset 0 0 0 2px #2563eb;
}

.tuan-shipment-method.is-selected .tuan-shipment-method-radio {
	border-color: #2563eb;
	box-shadow: inset 0 0 0 4px #2563eb;
}

.tuan-shipment-method.is-selected .tuan-shipment-method-icon {
	background: #dbeafe;
	color: #1d4ed8;
}

.tuan-shipment-method.is-selected .tuan-shipment-price {
	color: #2563eb;
}

.tuan-shipment-method-icon svg {
	display: block;
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.tuan-shipment-price .woocommerce-Price-amount {
	color: inherit;
	font-weight: inherit;
}

.tuan-shipment-price--free {
	text-transform: uppercase;
}

.tuan-shipment-empty {
	margin-bottom: 12px;
	color: #6b7280;
	font-size: 14px;
	line-height: 1.5;
}

.cart-totals-inner .tuan-shipping-calculator .shipping-calculator-form {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #e5e7eb;
}

/* Reset Woodmart shipping list styles inside our block. */
.cart-totals-inner .tuan-shipment-methods.woocommerce-shipping-methods label {
	margin-bottom: 0;
}

.cart-totals-inner .tuan-shipment-methods.woocommerce-shipping-methods input.shipping_method {
	position: absolute;
	float: none;
	top: auto;
	margin: 0;
}

/* --------------------------------------------------------------------------
   Checkout order review
   -------------------------------------------------------------------------- */

.tuan-checkout-review-order {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.tuan-checkout-review-order .tuan-checkout-review-table {
	width: 100%;
	margin-bottom: 0;
}

.tuan-checkout-review-order .tuan-checkout-review-table--products tbody tr:last-child {
	border-bottom: 1px solid var(--brdcolor-gray-300, #e5e7eb);
}

.tuan-checkout-review-order .tuan-checkout-shipment-wrap {
	display: block;
	width: 100%;
	padding-block: 15px;
	border-bottom: 1px solid var(--brdcolor-gray-300, #e5e7eb);
}

.tuan-checkout-review-order .tuan-shipment-block--checkout {
	width: 100%;
}

.tuan-checkout-review-order .tuan-shipment-methods--checkout {
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow: visible;
	border: none;
	border-radius: 0;
	background: transparent;
}

.tuan-checkout-review-order .tuan-shipment-methods--checkout .tuan-shipment-method + .tuan-shipment-method {
	border-top: none;
}

.tuan-checkout-review-order .tuan-shipment-methods--checkout .tuan-shipment-method-label {
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	background: #fff;
}

.tuan-checkout-review-order .tuan-shipment-methods--checkout .tuan-shipment-method.is-selected .tuan-shipment-method-label {
	background: #eff6ff;
	border-color: #2563eb;
	box-shadow: none;
}

.checkout-order-review .tuan-shipment-methods.woocommerce-shipping-methods label {
	margin-bottom: 0;
}

.checkout-order-review .tuan-shipment-methods.woocommerce-shipping-methods input.shipping_method {
	position: absolute;
	float: none;
	top: auto;
	margin: 0;
}

@media (max-width: 520px) {
	.tuan-shipment-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 8px;
	}

	.tuan-shipment-method-label {
		flex-wrap: wrap;
		padding: 12px 14px;
	}

	.tuan-shipment-price {
		width: 100%;
		padding-left: 54px;
		text-align: left;
	}
}
