/**
 * SUMO Reward Points – Cart & Checkout Blocks styling.
 *
 * Only covers the bits our own markup adds on top of WooCommerce's Blocks
 * classes (wc-block-components-*); everything else inherits WC's own styles.
 *
 * @since 33.0.4
 */

/* Notice content wrapper – keep block-level so it never fights the
 * flex layout of wc-block-components-notice-banner__content. */
.srp-notices-wrapper {
	display: block;
	width: 100%;
}

.srp-notices-wrapper > *:last-child {
	margin-bottom: 0;
}

/* Redeem-applied notice: message + inline "Apply" button. */
.srp-blocks-button-notice-msg {
	align-items: center;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: space-between;
	margin: 0;
}

.srp-blocks-button-notice-msg .srp-blocks-apply-btn {
	flex-shrink: 0;
}

/* Redeem form / applied-coupon chip wrapper. */
.srp-blocks-redeem-wrapper {
	width: 100%;
}

.srp-blocks-redeem-wrapper .wc-block-components-totals-coupon__form .wc-block-components-text-input,
.srp-blocks-redeem-wrapper .wc-block-components-totals-coupon__form .srp-blocks-predefined-group {
	flex: 1 1 auto;
	min-width: 0;
}

.srp-blocks-redeem-wrapper .srp-blocks-predefined-group {
	align-items: flex-end;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.srp-blocks-redeem-wrapper .srp-blocks-predefined-group .wc-block-components-text-input {
	flex: 1 1 200px;
	/* margin-top: 0; */
	min-width: 0;
}

.srp-blocks-redeem-wrapper .srp-blocks-predefined-select {
	width: auto;
	margin: 10px;
}

.srp-blocks-panel-toggle.wc-block-components-totals-coupon-link {
	align-items: center;
	background: none;
	border: none;
	box-shadow: none;
	color: inherit;
	display: flex;
	font: inherit;
	justify-content: space-between;
	line-height: 1;
	padding: 0;
	text-decoration: none !important;
	width: 100%;
}

.srp-blocks-panel-toggle.wc-block-components-totals-coupon-link:hover,
.srp-blocks-panel-toggle.wc-block-components-totals-coupon-link:focus,
.srp-blocks-panel-toggle.wc-block-components-totals-coupon-link:active {
	background: none;
	border: none;
	box-shadow: none;
	color: inherit;
	text-decoration: none !important;
}

.srp-blocks-panel-toggle-text {
	text-decoration: none !important;
}

.srp-blocks-panel-toggle-icon {
	display: block;
	fill: currentColor;
	flex-shrink: 0;
	height: 24px;
	margin-left: 4px;
	transition: transform 0.1s ease;
	width: 24px;
}

.srp-blocks-panel-toggle[aria-expanded="true"] .srp-blocks-panel-toggle-icon {
	transform: rotate(180deg);
}

.srp-blocks-apply-btn.wc-block-components-totals-coupon__button {
	height: 3em;
	margin-left: 8px;
	padding-left: 24px;
	padding-right: 24px;
	white-space: nowrap;
}

.srp-blocks-select-wrapper .srp-blocks-predefined-label {
	display: contents;
	font-size: 0.875em;
	margin-bottom: 4px;
}

/* Points-earned totals row – reuses WC's own totals-item classes so it
 * inherits the same padding/typography as Subtotal, Shipping and Tax;
 * these rules only guard against long labels/values wrapping badly. */
.srp-earn-points-row {
	overflow-wrap: anywhere;
}

.srp-earn-points-row .wc-block-components-totals-item__label {
	min-width: 0;
}

.srp-earn-points-row .wc-block-components-totals-item__value {
	flex-shrink: 0;
	text-align: right;
}

/* Positioning the earn-points row before/after the Order Total row (matching
 * "Points that can be Earned Message will display") is handled in JS
 * (srpPositionEarnPointsRow in srp-blocks.js) via direct DOM repositioning —
 * WC Blocks force-inserts extension rows at a fixed slot with no insertion-order
 * API, and CSS flex `order` can't reliably reach across its actual nesting. */
