/* =========================================================================
 * THE WITHDRAWAL FUNCTION - My account -> Withdraw from contract, the
 * per-order "Withdraw from contract here" action, and the VAT note on
 * My account -> view order.
 *
 * Enqueued on My account pages only (Withdrawal::assets). The text fields
 * already take neda-ecampus-ui's My account field look
 * (`.woocommerce form .form-row input.woocommerce-Input`); this file draws
 * only what is new: the radio list, the review list, and the buttons.
 *
 * Neda control rules (Design Rules §4/§5): 35px, 8px corners; primary lime
 * with a black label; secondary lime light with a 2px black edge; hover and
 * :focus-visible one appearance, cherry fill with a white label and no ring;
 * no coloured stripe on any edge; error box cherry light with a full 2px
 * cherry border. Radios stay native (accepted for launch) with the cherry
 * keyboard ring.
 * ========================================================================= */

body.woocommerce-account .neda-withdraw {
	max-width: 720px;
}

body.woocommerce-account .neda-withdraw__intro,
body.woocommerce-account .neda-withdraw p {
	color: #000000;
}

body.woocommerce-account .neda-withdraw__orders {
	margin: 0 0 20px;
	padding: 0;
	border: 0;
}

body.woocommerce-account .neda-withdraw__orders legend {
	margin-bottom: 8px;
	font-weight: 700;
	font-size: 15px;
	color: #000000;
}

body.woocommerce-account .neda-withdraw__order {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 8px 0;
	font-size: 15px;
	line-height: 1.45;
	color: #000000;
	cursor: pointer;
}

body.woocommerce-account .neda-withdraw__order input[type="radio"] {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	margin-top: 2px;
	accent-color: #000000;
}

body.woocommerce-account .neda-withdraw__order input[type="radio"]:focus-visible {
	outline: 3px solid #D7263D;
	outline-offset: 3px;
}

body.woocommerce-account .neda-withdraw__review {
	margin: 0 0 20px;
}

body.woocommerce-account .neda-withdraw__review > div {
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

body.woocommerce-account .neda-withdraw__review dt {
	font-weight: 700;
	color: #000000;
}

body.woocommerce-account .neda-withdraw__review dd {
	margin: 2px 0 0;
	color: #000000;
}

body.woocommerce-account .neda-withdraw__errors {
	margin: 0 0 20px;
	padding: 12px 16px;
	background: #FDD4D2;
	border: 2px solid #D7263D;
	border-radius: 10px;
	color: #000000;
}

body.woocommerce-account .neda-withdraw__errors ul {
	margin: 0;
	padding-inline-start: 18px;
}

body.woocommerce-account .neda-withdraw__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

/* ---- buttons: the form's, the view-order call to action, and the per-order
   action in the Orders table (WooCommerce gives it `button neda-withdraw`). */
body.woocommerce-account .neda-withdraw__button,
body.woocommerce-account .neda-withdraw-cta__button,
body.woocommerce-account .woocommerce-orders-table .button.neda-withdraw {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 35px;
	padding: 6px 20px;
	border: 0;
	border-radius: 8px;
	background: #C4C40E;
	color: #000000;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
}

/* Secondary: "Change", and the Orders-table action, which sits beside
   WooCommerce's own "View" and must not outshout it. */
body.woocommerce-account .neda-withdraw__button--secondary,
body.woocommerce-account .woocommerce-orders-table .button.neda-withdraw {
	background: #F1F3D6;
	background-clip: padding-box;
	border: 2px solid #000000;
}

body.woocommerce-account :is(.neda-withdraw__button, .neda-withdraw-cta__button, .woocommerce-orders-table .button.neda-withdraw):is(:hover, :focus-visible) {
	background: #D7263D;
	border-color: #D7263D;
	color: #FFFFFF;
	outline: none;
	box-shadow: none;
}

body.woocommerce-account .neda-withdraw-cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	margin: 0 0 24px;
}

body.woocommerce-account .neda-withdraw-cta__until {
	font-size: 14px;
	color: #000000;
}

body.woocommerce-account .neda-receipt-note {
	margin: 16px 0 0;
	font-size: 14px;
	line-height: 20px;
	color: #000000;
}

@media (forced-colors: active) {
	body.woocommerce-account :is(.neda-withdraw__button, .neda-withdraw-cta__button, .woocommerce-orders-table .button.neda-withdraw) {
		border: 1px solid ButtonText;
	}

	body.woocommerce-account :is(.neda-withdraw__button, .neda-withdraw-cta__button, .woocommerce-orders-table .button.neda-withdraw):focus-visible {
		outline: 3px solid Highlight;
		outline-offset: 3px;
	}

	body.woocommerce-account .neda-withdraw__errors {
		border: 1px solid CanvasText;
	}
}

body.woocommerce-account .neda-receipt-note p {
	margin: 0 0 8px;
}
