/* Core Styling for WooCommerce Withdrawal & Return Form */
:root {
	--wd-primary: #764ba2;
	--wd-primary-hover: #5d3a84;
	--wd-secondary: #64748b;
	--wd-secondary-hover: #475569;
	--wd-success: #10b981;
	--wd-bg-card: #ffffff;
	--wd-border: #e2e8f0;
	--wd-text-main: #0f172a;
	--wd-text-muted: #64748b;
	--wd-gradient: var(--wd-primary);
	--wd-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 8px 15px -6px rgba(0, 0, 0, 0.04);
	--wd-shadow-hover: 0 20px 40px -5px rgba(0, 0, 0, 0.06), 0 10px 20px -5px rgba(0, 0, 0, 0.04);
}

.wd-form-wrapper {
	max-width: 750px;
	margin: 2rem auto;
	padding: 2.5rem;
	background: var(--wd-bg-card);
	border: 1px solid var(--wd-border);
	border-radius: 16px;
	box-shadow: var(--wd-shadow);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--wd-text-main);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-sizing: border-box;
}

.wd-form-wrapper * {
	box-sizing: border-box;
}

.wd-form-wrapper:hover {
	box-shadow: var(--wd-shadow-hover);
}

/* Stepper Header */
.wd-stepper {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2.5rem;
	position: relative;
	padding: 0 10px;
}

.wd-stepper::before {
	content: '';
	position: absolute;
	top: 22px;
	left: 0;
	width: 100%;
	height: 3px;
	background: var(--wd-border);
	z-index: 1;
}

.wd-step {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 120px;
}

.wd-step-num {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: #ffffff;
	border: 3px solid var(--wd-border);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: bold;
	font-size: 1.05rem;
	color: var(--wd-text-muted);
	transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wd-step.active .wd-step-num {
	background: var(--wd-gradient);
	border-color: transparent;
	color: #ffffff;
	transform: scale(1.1);
	box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.1);
}

.wd-step.completed .wd-step-num {
	background: var(--wd-success);
	border-color: transparent;
	color: #ffffff;
}

.wd-step-text {
	margin-top: 0.8rem;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wd-text-muted);
	text-align: center;
	transition: color 0.3s ease;
	white-space: nowrap;
}

.wd-step.active .wd-step-text {
	color: var(--wd-primary);
}

.wd-step.completed .wd-step-text {
	color: var(--wd-success);
}

/* Step Content Transitions */
.wd-step-content {
	animation: wdFadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes wdFadeInUp {
	from {
		opacity: 0;
		transform: translateY(15px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Typography */
.wd-step-content h3 {
	font-size: 1.4rem;
	font-weight: 700;
	margin: 0 0 0.5rem 0;
	color: var(--wd-text-main);
	letter-spacing: -0.02em;
}

.wd-step-desc {
	font-size: 0.95rem;
	color: var(--wd-text-muted);
	margin: 0 0 2rem 0;
	line-height: 1.5;
}

/* Form Controls */
.wd-form-group {
	margin-bottom: 1.5rem;
}

.wd-form-group label {
	display: block;
	font-size: 0.9rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--wd-text-main);
}

.wd-form-group label .required {
	color: #ef4444;
}

.wd-form-group input[type="text"],
.wd-form-group input[type="email"],
.wd-form-group textarea {
	width: 100%;
	padding: 0.8rem 1rem;
	border: 1px solid var(--wd-border);
	border-radius: 8px;
	font-size: 0.95rem;
	background: #f8fafc;
	color: var(--wd-text-main);
	transition: all 0.3s ease;
	outline: none;
}

.wd-form-group input[type="text"]:focus,
.wd-form-group input[type="email"]:focus,
.wd-form-group textarea:focus {
	border-color: var(--wd-primary);
	background: #ffffff;
	box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.wd-btn {
	padding: 0.8rem 1.8rem;
	font-weight: 600;
	border-radius: 8px;
	border: none;
	cursor: pointer;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 0.95rem;
	outline: none;
}

.wd-btn-primary {
	background: var(--wd-gradient);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.wd-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.wd-btn-secondary {
	background: #f1f5f9;
	color: #475569;
	border: 1px solid var(--wd-border);
}

.wd-btn-secondary:hover {
	background: #e2e8f0;
	color: #0f172a;
}

/* Spinner */
.wd-spinner {
	width: 18px;
	height: 18px;
	border: 3px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	border-top-color: #ffffff;
	animation: wdSpin 0.8s linear infinite;
	display: inline-block;
}

@keyframes wdSpin {
	to { transform: rotate(360deg); }
}

/* Products Table & Selection styling */
.wd-products-title {
	font-size: 1.1rem;
	font-weight: 700;
	margin: 1.5rem 0 0.8rem 0;
	color: var(--wd-text-main);
}

.wd-products-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 2rem;
}

.wd-product-row {
	display: flex;
	align-items: center;
	padding: 1rem;
	border: 1px solid var(--wd-border);
	border-radius: 10px;
	background: #ffffff;
	transition: all 0.25s ease;
	gap: 1.2rem;
}

.wd-product-row.selected {
	border-color: var(--wd-primary);
	background: #fbfaff;
	box-shadow: 0 4px 12px rgba(118, 75, 162, 0.04);
}

.wd-product-select-col {
	display: flex;
	align-items: center;
}

.wd-product-select-col input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--wd-primary);
	cursor: pointer;
}

.wd-product-img-col img {
	width: 50px;
	height: 50px;
	border-radius: 6px;
	object-fit: cover;
	border: 1px solid var(--wd-border);
	display: block;
}

.wd-product-info-col {
	flex: 1;
}

.wd-prod-name {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--wd-text-main);
	margin-bottom: 3px;
	line-height: 1.3;
}

.wd-prod-price {
	font-size: 0.85rem;
	color: var(--wd-text-muted);
}

.wd-product-qty-col {
	display: flex;
	align-items: center;
	gap: 8px;
}

.wd-product-qty-col label {
	margin: 0;
	font-size: 0.85rem;
	color: var(--wd-text-muted);
	font-weight: normal;
}

.wd-product-qty-col select {
	padding: 0.35rem 0.5rem;
	border: 1px solid var(--wd-border);
	border-radius: 6px;
	font-size: 0.9rem;
	background: #ffffff;
	cursor: pointer;
	outline: none;
}

/* Radio Cards Grid */
.wd-radio-group {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
	.wd-radio-group {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 480px) {
	.wd-radio-group {
		grid-template-columns: 1fr;
	}
}

.wd-radio-card {
	border: 2px solid var(--wd-border);
	border-radius: 12px;
	padding: 1.25rem 0.75rem;
	background: #ffffff;
	cursor: pointer;
	position: relative;
	transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.wd-radio-card:hover {
	border-color: var(--wd-primary);
	opacity: 0.9;
}

.wd-radio-card input[type="radio"] {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
}

.wd-radio-card.active {
	border-color: var(--wd-primary);
	background: #f8fafc;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.wd-radio-card.active::after {
	content: '✓';
	position: absolute;
	top: -6px;
	right: -6px;
	width: 20px;
	height: 20px;
	background: var(--wd-primary);
	color: #ffffff !important;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: bold;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	z-index: 10;
}

.wd-radio-card-content {
	display: flex;
	flex-direction: column;
	align-items: center;
}

.wd-radio-card-content strong {
	font-size: 0.9rem;
	color: var(--wd-text-main);
	margin-top: 5px;
	display: block;
}

.wd-radio-card-content span {
	font-size: 0.75rem;
	color: var(--wd-text-muted);
	line-height: 1.3;
	margin-top: 4px;
}

/* Upload Zone */
.wd-upload-zone {
	border: 2px dashed var(--wd-border);
	border-radius: 10px;
	padding: 1.8rem;
	text-align: center;
	background: #f8fafc;
	cursor: pointer;
	transition: all 0.25s ease;
}

.wd-upload-zone:hover,
.wd-upload-zone.dragover {
	border-color: var(--wd-primary);
	background: #fbfaff;
}

.wd-upload-icon {
	font-size: 2.2rem;
	line-height: 1;
	margin-bottom: 6px;
	display: inline-block;
	color: var(--wd-text-muted);
	transition: transform 0.25s ease;
}

.wd-upload-zone:hover .wd-upload-icon {
	transform: translateY(-3px);
	color: var(--wd-primary);
}

.wd-upload-zone p {
	margin: 0;
	font-size: 0.9rem;
	color: var(--wd-text-main);
	font-weight: 500;
}

/* Error/Notification Boxes */
.wd-error-message {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	padding: 0.85rem 1rem;
	border-radius: 8px;
	margin-top: 1rem;
	margin-bottom: 1.5rem;
	font-size: 0.9rem;
	font-weight: 500;
	animation: wdShake 0.4s ease;
}

@keyframes wdShake {
	0%, 100% { transform: translateX(0); }
	20%, 60% { transform: translateX(-4px); }
	40%, 80% { transform: translateX(4px); }
}

/* Summary Grid inside stepper */
.wd-summary-grid {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wd-summary-row {
	display: flex;
	justify-content: space-between;
	padding-bottom: 10px;
	border-bottom: 1px solid #f1f5f9;
}

.wd-summary-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.wd-sum-label {
	font-weight: 600;
	color: var(--wd-text-muted);
	font-size: 0.9rem;
}

.wd-sum-val {
	font-weight: 600;
	color: var(--wd-text-main);
	font-size: 0.9rem;
	text-align: right;
}

.wd-summary-products-list {
	list-style: none;
	padding: 0;
	margin: 0;
	text-align: left;
}

.wd-summary-products-list li {
	font-size: 0.85rem;
	color: var(--wd-text-main);
	margin-bottom: 5px;
	display: flex;
	justify-content: space-between;
	gap: 20px;
}

/* Action Container */
.wd-form-actions {
	margin-top: 2rem;
	display: flex;
	justify-content: flex-end;
}
