:root {
	--wc-withdrawal-primary: #007cba;
	--wc-withdrawal-bg: #ffffff;
	--wc-withdrawal-text: #333333;
	--wc-withdrawal-border: #e2e8f0;
	--wc-withdrawal-error: #e53e3e;
	--wc-withdrawal-success: #38a169;
	--wc-withdrawal-info-bg: #ebf8ff;
	--wc-withdrawal-info-text: #2b6cb0;
	--wc-withdrawal-focus: rgba(0, 124, 186, 0.5);
	--wc-withdrawal-radius: 8px;
	--wc-withdrawal-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Form Wrapper - High specificity to override themes */
.wc-withdrawal-form-wrapper {
	background: var(--wc-withdrawal-bg) !important;
	color: var(--wc-withdrawal-text) !important;
	border-radius: var(--wc-withdrawal-radius) !important;
	padding: 32px !important;
	box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
	max-width: 650px !important;
	margin: 0 auto !important;
	font-family: system-ui, -apple-system, sans-serif !important;
	animation: slideUpFade 0.5s ease-out;
	border: 1px solid var(--wc-withdrawal-border);
}

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

/* Fields */
.wc-withdrawal-form-wrapper .wc-withdrawal-field {
	margin-bottom: 24px !important;
	position: relative !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-field label {
	display: block !important;
	margin-bottom: 6px !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	color: #1e293b !important;
}

/* Hide auto-injected <br> tags from wpautop */
.wc-withdrawal-form-wrapper br {
	display: none !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-field .required {
	color: var(--wc-withdrawal-error) !important;
}

.wc-withdrawal-form-wrapper input[type="text"],
.wc-withdrawal-form-wrapper input[type="email"],
.wc-withdrawal-form-wrapper input[type="number"],
.wc-withdrawal-form-wrapper select,
.wc-withdrawal-form-wrapper input[type="file"] {
	width: 100% !important;
	padding: 14px 18px !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: var(--wc-withdrawal-radius) !important;
	font-size: 16px !important;
	transition: var(--wc-withdrawal-transition) !important;
	background-color: #f8fafc !important;
	color: #0f172a !important;
	box-sizing: border-box !important;
	box-shadow: none !important;
}

.wc-withdrawal-form-wrapper input:focus,
.wc-withdrawal-form-wrapper select:focus {
	outline: none !important;
	border-color: var(--wc-withdrawal-primary) !important;
	box-shadow: 0 0 0 3px var(--wc-withdrawal-focus) !important;
	background-color: #ffffff !important;
}

/* Checkboxes Area */
.wc-withdrawal-form-wrapper .wc-withdrawal-checkboxes {
	margin-bottom: 24px !important;
	background: transparent !important;
	padding: 10px 0 !important;
	border: none !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-checkbox-label {
	display: flex !important;
	align-items: flex-start !important;
	gap: 12px !important;
	margin-bottom: 16px !important;
	font-size: 14px !important;
	cursor: pointer !important;
	line-height: 1.5 !important;
	color: var(--wc-withdrawal-text) !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-checkbox-label:last-child {
	margin-bottom: 0 !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-checkbox-label input[type="checkbox"] {
	margin-top: 3px !important;
	width: 18px !important;
	height: 18px !important;
	accent-color: var(--wc-withdrawal-primary) !important;
	flex-shrink: 0 !important;
}

/* Submit Button */
.wc-withdrawal-form-wrapper .button.wc-withdrawal-submit,
.wc-withdrawal-form-wrapper .button#wc-withdrawal-validate-btn {
	background-color: var(--wc-withdrawal-primary) !important;
	color: #ffffff !important;
	border: none !important;
	padding: 12px 24px !important;
	border-radius: var(--wc-withdrawal-radius) !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	width: 100% !important;
	transition: var(--wc-withdrawal-transition) !important;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
	gap: 10px !important;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.wc-withdrawal-form-wrapper .button.wc-withdrawal-submit:hover,
.wc-withdrawal-form-wrapper .button#wc-withdrawal-validate-btn:hover {
	opacity: 0.9 !important;
	transform: translateY(-2px) !important;
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Loading state */
.wc-withdrawal-form-wrapper .button.loading {
	opacity: 0.8 !important;
	cursor: not-allowed !important;
	pointer-events: none !important;
}

.wc-withdrawal-form-wrapper .button.loading::after {
	content: "" !important;
	width: 18px !important;
	height: 18px !important;
	border: 3px solid rgba(255, 255, 255, 0.3) !important;
	border-top-color: #ffffff !important;
	border-radius: 50% !important;
	animation: spin 1s linear infinite !important;
}

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

/* Response Messages */
.wc-withdrawal-form-wrapper .wc-withdrawal-response {
	margin-bottom: 24px !important;
	border-radius: var(--wc-withdrawal-radius) !important;
	font-size: 15px !important;
	animation: fadeIn 0.4s ease-out !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-response p {
	margin: 0 !important;
	display: flex !important;
	align-items: center !important;
	gap: 10px !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-response.error {
	background-color: #fff5f5 !important;
	color: var(--wc-withdrawal-error) !important;
	padding: 16px !important;
	border-left: 4px solid var(--wc-withdrawal-error) !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-response.success {
	background-color: #f0fff4 !important;
	color: var(--wc-withdrawal-success) !important;
	padding: 16px !important;
	border-left: 4px solid var(--wc-withdrawal-success) !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-response.info {
	background-color: var(--wc-withdrawal-info-bg) !important;
	color: var(--wc-withdrawal-info-text) !important;
	padding: 16px !important;
	border-left: 4px solid var(--wc-withdrawal-info-text) !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-spinner {
	display: inline-block !important;
	width: 16px !important;
	height: 16px !important;
	border: 2px solid rgba(43, 108, 176, 0.3) !important;
	border-top-color: var(--wc-withdrawal-info-text) !important;
	border-radius: 50% !important;
	animation: spin 1s linear infinite !important;
}

/* Products Table and Order Info */
.wc-withdrawal-form-wrapper .wc-withdrawal-order-info {
	background: #f8fafc !important;
	padding: 20px !important;
	border-radius: var(--wc-withdrawal-radius) !important;
	border: 1px solid var(--wc-withdrawal-border) !important;
	margin-bottom: 24px !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-order-info h4 {
	margin-top: 0 !important;
	margin-bottom: 12px !important;
	font-size: 18px !important;
	color: var(--wc-withdrawal-text) !important;
	font-weight: 700 !important;
	border-bottom: 1px solid var(--wc-withdrawal-border) !important;
	padding-bottom: 8px !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-order-info p {
	margin: 0 !important;
	font-size: 15px !important;
	line-height: 1.6 !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-products-list {
	margin-bottom: 28px !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-products-list h4 {
	font-size: 20px !important;
	color: #0f172a !important;
	margin-bottom: 16px !important;
	font-weight: 800 !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-products-table {
	width: 100% !important;
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border: 1px solid #e2e8f0 !important;
	border-radius: 12px !important;
	overflow: hidden !important;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
	background: #ffffff !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-products-table th, 
.wc-withdrawal-form-wrapper .wc-withdrawal-products-table td {
	padding: 18px 20px !important;
	border: none !important;
	border-bottom: 1px solid #f1f5f9 !important;
	text-align: left !important;
	font-size: 15px !important;
	color: #334155 !important;
	background: transparent !important;
	vertical-align: middle !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-products-table tr {
	border: none !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-products-table th {
	background: #f8fafc !important;
	font-weight: 700 !important;
	color: #64748b !important;
	text-transform: uppercase !important;
	font-size: 13px !important;
	letter-spacing: 1px !important;
	border-bottom: 2px solid #e2e8f0 !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-products-table tr:last-child td {
	border-bottom: none !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-products-table tr:hover td {
	background: #f8fafc !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-item-qty {
	width: 70px !important;
	padding: 10px 12px !important;
	text-align: center !important;
	border: 1px solid #cbd5e1 !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
	background-color: #ffffff !important;
}

.wc-withdrawal-form-wrapper .wc-withdrawal-item-checkbox {
	width: 22px !important;
	height: 22px !important;
	cursor: pointer !important;
	accent-color: var(--wc-withdrawal-primary) !important;
}

/* Modal specific (if used via My Account button) */
.wc-withdrawal-modal { display: none; }
.wc-withdrawal-modal.is-open { display: block; }
.wc-withdrawal-modal-overlay {
	position: fixed; top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0,0,0,0.6);
	display: flex; justify-content: center; align-items: center;
	z-index: 99999; backdrop-filter: blur(4px);
}
.wc-withdrawal-modal-container {
	background: transparent;
	max-width: 100%; width: 650px;
}
.wc-withdrawal-modal-header {
	background: var(--wc-withdrawal-bg);
	padding: 20px 32px;
	border-radius: var(--wc-withdrawal-radius) var(--wc-withdrawal-radius) 0 0;
	display: flex; justify-content: space-between; align-items: center;
	border-bottom: 1px solid var(--wc-withdrawal-border);
}
.wc-withdrawal-modal-header h2 { margin: 0; font-size: 22px; font-weight: 700; }
.wc-withdrawal-modal-close {
	background: transparent; border: 0; cursor: pointer; font-size: 28px; line-height: 1; color: #94a3b8;
}
.wc-withdrawal-modal-close:hover { color: #333; }
.wc-withdrawal-modal-close::before { content: "\00d7"; }
.wc-withdrawal-modal-content .wc-withdrawal-form-wrapper {
	border-top-left-radius: 0 !important;
	border-top-right-radius: 0 !important;
	box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}
