/**
 * Public-facing styles for the Right of Withdrawal form.
 */

.rd-row-form {
	max-width: 720px;
	margin: 0 auto;
}

.rd-row-form h2 {
	margin-top: 0;
}

.rd-row-intro {
	color: #555;
	margin-bottom: 1.5em;
}

.rd-row-deadline {
	color: #444;
	font-size: 0.95em;
	margin: -0.5em 0 1.5em;
}

.rd-row-field {
	display: flex;
	flex-direction: column;
	margin-bottom: 1em;
}

.rd-row-contact-pref {
	flex-direction: row;
	align-items: center;
	gap: 20px;
}

.rd-row-field .rd-row-radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
}

.rd-row-field label {
	font-weight: 600;
	margin-bottom: 4px;
}

.rd-row-field input[type="text"],
.rd-row-field input[type="email"],
.rd-row-field textarea {
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	width: 100%;
	box-sizing: border-box;
}

.rd-row-items {
	width: 100%;
	border-collapse: collapse;
	margin: 1em 0;
}

.rd-row-items th,
.rd-row-items td {
	border-bottom: 1px solid #eee;
	padding: 8px;
	text-align: left;
	vertical-align: middle;
}

.rd-row-items .rd-row-qty {
	width: 70px;
	padding: 4px 6px;
}

.rd-row-items img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 4px;
	display: block;
}

.rd-row-error {
	background: #fdecea;
	border: 1px solid #f5c2c0;
	color: #a12622;
	padding: 10px 14px;
	border-radius: 4px;
	margin-bottom: 1em;
}

.rd-row-success {
	background: #e8f5e9;
	border: 1px solid #b7dfb9;
	color: #1a7f37;
	padding: 14px 16px;
	border-radius: 4px;
}

.rd-row-summary {
	background: #f7f7f7;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	padding: 16px;
	margin-bottom: 1.5em;
}

.rd-row-declaration {
	margin-top: 1em;
	font-size: 0.92em;
	color: #444;
}

.rd-row-actions {
	margin-top: 1.5em;
}

/* Step 2: back button stacked above a full-width confirm button. */
.rd-row-actions-stacked {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rd-row-confirm {
	font-weight: 700;
	width: 100%;
}

.rd-row-back {
	width: 100%;
}

.rd-row-timestamp {
	margin: 0 0 0.5em;
}

.rd-row-account-notice {
	margin: 0 0 1em;
}

.rd-row-account-cta {
	background: #2c2c2c;
	color: #fff;
	padding: 20px;
	border-radius: 6px;
	margin-bottom: 2em;
}

.rd-row-account-cta p {
	color: #fff;
	margin: 0 0 12px;
}

.rd-row-account-cta .button {
	background: #fff !important;
	color: #2c2c2c !important;
	border: none;
}

/*
 * Fallback skin for our buttons.
 *
 * Wrapped in :where() so the whole block carries zero specificity: any theme
 * rule for .button (0,1,0) beats it, and these values only paint when the
 * theme styles nothing — instead of the browser's default grey chrome.
 */
:where(.rd-row-form .button, .rd-row-order-button .button) {
	display: inline-block;
	padding: 12px 20px;
	border: 1px solid #2c2c2c;
	border-radius: 4px;
	background: #2c2c2c;
	color: #fff;
	font-size: 1em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}

:where(.rd-row-form .button:hover, .rd-row-order-button .button:hover) {
	border-color: #444;
	background: #444;
	color: #fff;
}

:where(.rd-row-form .button:focus-visible, .rd-row-order-button .button:focus-visible) {
	outline: 2px solid #2c2c2c;
	outline-offset: 2px;
}

/*
 * The back button is deliberately NOT fallback-only: on themes that do style
 * .button it would otherwise look identical to the confirm button right below
 * it. Neutral values (no background, inherited text colour) keep it in step
 * with any palette while staying visibly secondary.
 */
.rd-row-form .rd-row-back {
	border: 1px solid #c9c9c9;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	font-weight: 400;
	text-shadow: none;
	box-shadow: none;
}

.rd-row-form .rd-row-back:hover,
.rd-row-form .rd-row-back:focus {
	border-color: #a8a8a8;
	background: rgba(0, 0, 0, 0.04);
	color: inherit;
}
