.sg-redeem {
	clear: both;
	box-sizing: border-box;
	margin: 0 0 1.5em;
	padding: 1.25em 1.25em 1em;
	border: 1px solid rgba( 0, 0, 0, 0.12 );
	border-radius: 8px;
	background: rgba( 0, 0, 0, 0.015 );
}

/* WooCommerce's block checkout zeroes the side padding of anything placed in
 * the order summary slot (.wc-block-components-totals-wrapper.slot-wrapper
 * > * > *), which left the widget's text touching its border. Match that
 * specificity so the widget keeps its own padding there. */
.wc-block-components-totals-wrapper .sg-redeem.sg-redeem,
.wc-block-components-order-meta .sg-redeem.sg-redeem {
	padding: 1.25em 1.25em 1em;
	margin: 0.5em 0 1em;
}

.sg-redeem__experience {
	font-size: 0.9em;
	opacity: 0.85;
}

.sg-redeem__title {
	margin: 0 0 0.75em;
	font-size: 1.05em;
}

.sg-redeem__form {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: stretch;
}

.sg-redeem__input {
	flex: 1 1 220px;
	min-width: 0;
}

.sg-redeem__apply,
.sg-redeem__remove {
	flex: 0 0 auto;
}

.sg-redeem__applied p {
	margin: 0 0 0.5em;
}

.sg-redeem__message {
	margin: 0.6em 0 0;
	min-height: 1.2em;
	font-size: 0.92em;
}

.sg-redeem__message--error {
	color: #b32d2e;
}

.sg-redeem.is-busy {
	opacity: 0.6;
	pointer-events: none;
}

.sg-redeem__amount-row {
	display: block;
	margin: 0.75em 0;
	font-size: 0.95em;
}

.sg-redeem__amount-field {
	display: inline-flex;
	align-items: center;
	gap: 0.25em;
	margin-left: 0.5em;
}

.sg-redeem__symbol {
	opacity: 0.7;
}

.sg-redeem__amount {
	width: 6.5em;
}

.sg-redeem__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
}

.sg-sell {
	margin: 1em 0;
}

.sg-sell__row {
	display: block;
	margin: 0 0 0.75em;
}

.sg-sell__row label {
	display: block;
	font-weight: 600;
	margin-bottom: 0.25em;
}

.sg-sell__row input[type="text"],
.sg-sell__row input[type="email"],
.sg-sell__row input[type="number"],
.sg-sell__row input[type="date"],
.sg-sell__row textarea,
.sg-sell__row select {
	width: 100%;
	max-width: 22em;
}

.sg-sell__hint {
	display: block;
	font-size: 0.85em;
	opacity: 0.75;
	margin-top: 0.25em;
}

.sg-sell__delivery select {
	max-width: 22em;
	white-space: normal;
}

.sg-sell__delivery-desc {
	display: block;
	font-size: 0.85em;
	opacity: 0.8;
	margin-top: 0.35em;
}

.sg-sell__address-note {
	font-weight: 600;
	margin: 0.25em 0 0.5em;
}

/* On the basket page the box sits under the basket table, next to the coupon
 * field. */
.woocommerce-cart-form .sg-redeem {
	margin-top: 1.5em;
}

/* Some themes give headings large margins or clear floats on them; keep the
 * box's own heading compact wherever it is placed. */
.sg-redeem .sg-redeem__title {
	clear: none;
	float: none;
	height: auto;
	min-height: 0;
	margin-top: 0;
}

.sg-redeem__total {
	margin: 0.75em 0 0;
}

/* Voucher line in the basket / checkout / order totals: let the voucher code
 * wrap inside its own column. Codes are one long word, and themes that style
 * totals labels in capitals with letter spacing in a fixed-width column
 * otherwise let it run into the amount next to it. */
.woocommerce table tr.fee th,
.woocommerce table tr.fee td,
.woocommerce-table--order-details tfoot th {
	overflow-wrap: anywhere;
}
