.wc-block-checkout__sidebar .ial-aff-checkout-referral-block,
.wc-block-checkout__sidebar .ial-aff-checkout-referral {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral {
	margin: 8px 0 16px;
	padding: 0;
	background: transparent;
	color: #fff;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__heading {
	display: block;
	margin: 0 0 12px;
	color: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.4;
	text-transform: uppercase;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__row {
	display: flex;
	width: 100%;
	flex-direction: column;
	align-items: stretch;
	gap: 8px;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__row input[type="text"] {
	appearance: none;
	box-sizing: border-box;
	display: block;
	width: 100% !important;
	min-width: 0;
	max-width: none;
	height: 48px;
	margin: 0 !important;
	padding: 0 16px !important;
	border: 1px solid rgba(255, 255, 255, .55) !important;
	border-radius: 4px !important;
	outline: 0;
	background: #0d0d0d !important;
	color: #fff !important;
	font: inherit;
	font-size: 16px;
	line-height: 48px;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__row input[type="text"]::placeholder {
	color: rgba(255, 255, 255, .66);
	opacity: 1;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__row input[type="text"]:focus {
	border-color: #fff !important;
	box-shadow: 0 0 0 1px #fff;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__apply {
	box-sizing: border-box;
	width: 100% !important;
	min-width: 0;
	height: 48px !important;
	margin: 0 !important;
	padding: 0 16px !important;
	border-radius: 4px !important;
	white-space: nowrap;
	text-transform: none;
	font-size: 16px !important;
	font-weight: 600;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__apply[disabled] {
	cursor: not-allowed;
	opacity: .5;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__apply[aria-busy="true"] {
	cursor: wait;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__clear {
	display: inline-block;
	margin: 9px 0 0;
	color: inherit;
	font-size: 12px;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__clear[hidden] {
	display: none !important;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__clear:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__clear[aria-disabled="true"] {
	pointer-events: none;
	opacity: .5;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__message {
	min-height: 1.4em;
	margin: 8px 0 0;
	color: #7ee2a8;
	font-size: 13px;
	line-height: 1.4;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__message:empty {
	min-height: 0;
	margin-top: 0;
}

.wc-block-checkout__sidebar .ial-aff-checkout-referral__message.is-error {
	color: #ff9b9b;
}

.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-totals-block > .ial-aff-checkout-referral-block {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	padding: 18px;
}

@media (max-width: 480px) {
	.wc-block-checkout__sidebar .wp-block-woocommerce-checkout-order-summary-totals-block > .ial-aff-checkout-referral-block {
		padding: 14px 0;
	}

	.wc-block-checkout__sidebar .ial-aff-checkout-referral__row input[type="text"],
	.wc-block-checkout__sidebar .ial-aff-checkout-referral__apply {
		height: 46px !important;
	}
}

/* Stack WooCommerce coupon badges vertically in the discounts row. */
.wc-block-components-totals-discount .wc-block-components-totals-discount__coupon-list,
.wc-block-components-totals-discount .wc-block-components-totals-discount__coupon-list-items,
.wc-block-components-totals-discount .wc-block-components-totals-discount__coupons {
	display: flex !important;
	flex-direction: column !important;
	align-items: flex-start !important;
	gap: 6px !important;
}
.wc-block-components-totals-discount .wc-block-components-totals-discount__coupon-list > *,
.wc-block-components-totals-discount .wc-block-components-totals-discount__coupon-list-items > * {
	margin: 0 !important;
}
.wc-block-components-totals-discount .ial-aff-referral-override-notice {
	flex-basis: 100%;
	width: 100%;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.5;
	opacity: .9;
	overflow-wrap: anywhere;
}
