/**
 * Front-end styles for the withdrawal form.
 *
 * Deliberately restrained: this loads on top of whatever theme the shop runs,
 * so it sets spacing and states rather than imposing a look. Colours are kept
 * to what the contrast requirement needs.
 */

.fdwb-wrap {
	max-width: 40rem;
	margin: 0 auto;
}

.fdwb-heading {
	margin: 0 0 0.75rem;
	font-size: 1.25rem;
}

.fdwb-intro,
.fdwb-order-meta {
	margin: 0 0 1rem;
}

.fdwb-days {
	display: inline-block;
	margin-left: 0.5rem;
	padding: 0.1rem 0.5rem;
	border-radius: 3px;
	background: #e6f4ea;
	color: #14532d;
	font-size: 0.875rem;
}

/* Forms */

.fdwb-form {
	margin: 0 0 1.5rem;
}

/* Fields */

.fdwb-field {
	margin: 0 0 1.25rem;
}

.fdwb-field label {
	display: block;
	margin-bottom: 0.3rem;
	font-weight: 600;
}

.fdwb-field input[type="text"],
.fdwb-field input[type="email"],
.fdwb-field textarea {
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid #6b7280;
	border-radius: 4px;
	font: inherit;
}

.fdwb-field input:focus-visible,
.fdwb-field textarea:focus-visible,
.fdwb-button:focus-visible,
.fdwb-fallback summary:focus-visible {
	outline: 3px solid #1d4ed8;
	outline-offset: 2px;
}

.fdwb-help {
	display: block;
	margin-top: 0.3rem;
	color: #4b5563;
	font-size: 0.875rem;
}

/* Items */

.fdwb-items {
	margin: 0 0 1.5rem;
	padding: 1rem;
	border: 1px solid #d1d5db;
	border-radius: 4px;
}

.fdwb-items legend {
	padding: 0 0.4rem;
	font-weight: 600;
}

.fdwb-item {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	justify-content: space-between;
	padding: 0.6rem 0;
	border-bottom: 1px solid #e5e7eb;
}

.fdwb-item:last-child {
	border-bottom: 0;
}

.fdwb-item__name {
	flex: 1 1 14rem;
	font-weight: 600;
}

.fdwb-item__qty {
	display: flex;
	gap: 0.4rem;
	align-items: center;
}

.fdwb-item__qty label {
	font-size: 0.875rem;
}

.fdwb-item__qty input[type="number"] {
	width: 4.5rem;
	padding: 0.35rem 0.4rem;
	border: 1px solid #6b7280;
	border-radius: 4px;
	font: inherit;
}

.fdwb-item__qty .fdwb-help {
	margin-top: 0;
}

/* Summary on the confirmation step */

.fdwb-summary {
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
	border: 1px solid #d1d5db;
	border-radius: 4px;
}

.fdwb-summary li {
	display: flex;
	gap: 0.75rem;
	justify-content: space-between;
	padding: 0.6rem 0.9rem;
	border-bottom: 1px solid #e5e7eb;
}

.fdwb-summary li:last-child {
	border-bottom: 0;
}

.fdwb-summary__name {
	flex: 1 1 auto;
}

.fdwb-summary__qty {
	white-space: nowrap;
}

.fdwb-legal {
	margin: 0 0 1.25rem;
	padding: 0.9rem;
	border-left: 4px solid #6b7280;
	background: #f3f4f6;
	color: #1f2937;
}

/* Buttons */

.fdwb-actions {
	margin: 0;
}

.fdwb-button {
	display: inline-block;
	padding: 0.6rem 1.2rem;
	border: 1px solid #1f2937;
	border-radius: 4px;
	background: #1f2937;
	color: #fff;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
}

.fdwb-button:hover,
.fdwb-button:focus {
	background: #111827;
	color: #fff;
}

.fdwb-button--primary {
	border-color: #14532d;
	background: #14532d;
}

.fdwb-button--primary:hover,
.fdwb-button--primary:focus {
	background: #0f3d21;
}

/* Notices */

.fdwb-notice {
	margin: 0 0 1.25rem;
	padding: 0.9rem 1rem;
	border-left: 4px solid;
	border-radius: 0 4px 4px 0;
}

.fdwb-notice--error {
	border-color: #b91c1c;
	background: #fef2f2;
	color: #7f1d1d;
}

.fdwb-notice--info {
	border-color: #1d4ed8;
	background: #eff6ff;
	color: #1e3a8a;
}

.fdwb-notice--success {
	border-color: #14532d;
	background: #f0fdf4;
	color: #14532d;
}

.fdwb-notice--success .fdwb-heading {
	color: inherit;
}

/* Fallback disclosure */

.fdwb-fallback {
	margin-top: 2rem;
	padding-top: 1.25rem;
	border-top: 1px solid #d1d5db;
}

.fdwb-fallback summary {
	cursor: pointer;
	color: #1d4ed8;
}

.fdwb-fallback[open] summary {
	margin-bottom: 1.25rem;
}

/* Site-wide footer link.
   Given its own block and a visible rule so it reads as a distinct function
   rather than one more item in a row of legal links. */

.fdwb-footer-link {
	padding: 0.9rem 1rem;
	border-top: 1px solid #d1d5db;
	text-align: center;
}

.fdwb-footer-link a {
	font-weight: 600;
	text-decoration: underline;
}

/* Honeypot: removed from the accessibility tree and from view, without
   display:none, which some bots treat as a signal to skip the field. */

.fdwb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Withdrawal requests shown under an order in My Account. The table borrows
   WooCommerce's own shop_table class, so it inherits the theme's spacing and
   borders; only the status pill is ours. */

.fdwb-account-requests {
	margin: 2rem 0 0;
}

.fdwb-account-table {
	width: 100%;
}

.fdwb-status {
	display: inline-block;
	padding: 0.15em 0.6em;
	border-radius: 999px;
	font-size: 0.85em;
	font-weight: 600;
	line-height: 1.6;
	white-space: nowrap;
}

.fdwb-status--pending {
	background: #fef3c7;
	color: #78350f;
}

.fdwb-status--accepted {
	background: #d1fae5;
	color: #065f46;
}

.fdwb-status--rejected {
	background: #fee2e2;
	color: #7f1d1d;
}

.fdwb-account-note {
	margin: 0.75rem 0 0;
	font-size: 0.9em;
	opacity: 0.85;
}
