/**
 * WLM Donation Form Enhancements - Public Styles
 */

/* ========================================
   Section Titles
   ======================================== */
.donation-form .wlm-section-title {
	color: #404040;
	font-size: 18px;
	margin: 15px 0 10px 0;
	font-weight: 600;
}

body #donation-form-container .donation-form h3 {
	margin-top: 7px;
}
body #donation-form-container .donation-form .fund h3 {
	margin-top: 20px;
}

/* ========================================
   Frequency Buttons (One-Time / Monthly)
   ======================================== */
.donation-form .wlm-frequency-buttons {
	display: flex !important;
	gap: 12px;
	margin: 15px 0;
	flex-wrap: wrap;
}

/* ========================================
   Amount Pills
   ======================================== */
.donation-form .wlm-amount-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin: 15px 0;
}

/* ========================================
   Pill Button Shared Styles
   ======================================== */
.donation-form .wlm-pill-button {
	/* Base styles */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	
	/* Typography */
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	text-align: center;
	white-space: nowrap;
	
	/* Colors - default state */
	background-color: #ffffff;
	color: #404040;
	border: 2px solid #d0d0d0;
	
	/* Border radius */
	border-radius: 25px;
	
	/* Cursor */
	cursor: pointer;
	
	/* Transitions */
	transition: all 0.2s ease-in-out;
	
	/* Remove default button styles */
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	
	/* Prevent text selection */
	user-select: none;
	-webkit-user-select: none;
	-moz-user-select: none;
}

/* Hover state */
.donation-form .wlm-pill-button:hover {
	border-color: #5792FF;
	background-color: #f0f5ff;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(87, 146, 255, 0.15);
}

/* Focus state - WCAG compliant */
.donation-form .wlm-pill-button:focus {
	outline: 3px solid #5792FF;
	outline-offset: 2px;
	border-color: #5792FF;
}

/* Active/pressed state */
.donation-form .wlm-pill-button:active {
	transform: translateY(0);
	box-shadow: 0 1px 3px rgba(87, 146, 255, 0.2);
}

/* Selected state */
.donation-form .wlm-pill-button.selected {
	background-color: #5792FF;
	color: #ffffff;
	border-color: #5792FF;
	font-weight: 600;
	box-shadow: 0 2px 8px rgba(87, 146, 255, 0.3);
}

.donation-form .wlm-pill-button.selected:hover {
	background-color: #4580e6;
	border-color: #4580e6;
	box-shadow: 0 3px 12px rgba(87, 146, 255, 0.4);
}

/* ========================================
   Other Amount Input
   ======================================== */
/*NOT NEEDED, using the original one*/
.donation-form .wlm-other-amount,
.donation-form .field.start-date,
.donation-form .field.frequency {
	display: none !important;
}
.donation-form .wlm-section-title {
	display: block !important;
}
/*.donation-form .wlm-other-amount,*/
.donation-form .field.other-amount {
	display: inline-flex !important;
	align-items: center;
	min-height: 44px;
	padding: 0 15px;
	background-color: #ffffff;
	border: 2px solid #d0d0d0;
	border-radius: 25px;
	transition: all 0.2s ease-in-out;
}

.donation-form .wlm-other-amount:hover,
.donation-form .field.other-amount:hover {
	border-color: #5792FF;
	background-color: #f0f5ff;
}

.donation-form .wlm-other-amount.focused,
.donation-form .field.other-amount.focused {
	border-color: #5792FF;
	outline: 3px solid #5792FF;
	outline-offset: 2px;
	background-color: #ffffff;
}

.donation-form .wlm-other-amount + h3 {
	display: none !important;
}

.donation-form .wlm-other-label {
	font-size: 16px;
	font-weight: 500;
	color: #404040;
	margin: 0 5px 0 0;
	padding: 0;
	display: inline-block;
}

.donation-form .wlm-other-input,
.donation-form .otherAmount {
	border: none;
	background: transparent;
	padding: 8px 5px;
	font-size: 16px;
	font-family: inherit;
	color: #404040;
	width: 140px !important;
	max-width: 100%;
	outline: none;
}

.donation-form .wlm-other-input::placeholder,
.donation-form .otherAmount::placeholder {
	color: #999;
}

/* Remove spinner arrows from number input */
.donation-form .wlm-other-input::-webkit-outer-spin-button,
.donation-form .wlm-other-input::-webkit-inner-spin-button,
.donation-form .otherAmount::-webkit-outer-spin-button,
.donation-form .otherAmount::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.donation-form .wlm-other-input[type=number],
.donation-form .otherAmount[type=number] {
	-moz-appearance: textfield;
}

/* ========================================
   Section Spacing Adjustments
   ======================================== */
.donation-form .section.fund {
	padding-bottom: 20px;
}

.donation-form .section.fund h3 {
	margin-top: 0;
	margin-bottom: 15px;
}

.donation-form .section.recurring {
	padding-bottom: 20px;
}

.donation-form .section.donation {
	padding-bottom: 20px;
}

.donation-form .section.custom-fields {
	padding-bottom: 20px;
}

/*.donation-form .section.contact {
	padding-bottom: 20px;
}*/
.donation-form .field.city {
	padding-top: 0;
}
.donation-form .field.street-address {
	padding-top: 8px;
}

/* Move true-impact (cover fees) into recurring section */
.donation-form .section.recurring .section.true-impact {
	padding: 0;
	margin-top: 15px;
	display: block !important;
}

.donation-form .section.recurring .section.true-impact .field {
	padding: 0;
}

#donation-form-container .donation-form .field select {
	max-width: 265px;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet and below */
@media (max-width: 768px) {
	.donation-form .wlm-frequency-buttons,
	.donation-form .wlm-amount-pills {
		gap: 10px;
	}
	
	.donation-form .wlm-pill-button {
		min-height: 44px;
		padding: 10px 16px;
		font-size: 15px;
	}
	
	.donation-form .wlm-other-amount,
	.donation-form .field.other-amount {
		min-height: 44px;
		padding: 0 12px;
	}
	
	.donation-form .wlm-other-input,
	.donation-form .otherAmount {
		width: 120px !important;
		font-size: 15px;
	}
}

/* Mobile */
@media (max-width: 480px) {
	.donation-form .wlm-frequency-buttons {
		width: 100%;
	}
	
	.donation-form .wlm-frequency-buttons .wlm-pill-button {
		flex: 1;
		min-width: 0;
	}
	
	.donation-form .wlm-amount-pills {
		gap: 8px;
	}
	
	.donation-form .wlm-amount-pills .wlm-pill-button {
		flex: 1 1 calc(50% - 4px);
		min-width: 0;
		padding: 10px 12px;
		font-size: 14px;
	}
	
	.donation-form .wlm-other-amount,
	.donation-form .field.other-amount {
		width: 100%;
		max-width: 100%;
	}
	
	.donation-form .wlm-other-input,
	.donation-form .otherAmount {
		flex: 1;
		width: 100% !important;
	}
}

/* ========================================
   High Contrast Mode Support
   ======================================== */
@media (prefers-contrast: high) {
	.donation-form .wlm-pill-button {
		border-width: 3px;
	}
	
	.donation-form .wlm-pill-button:focus {
		outline-width: 4px;
	}
	
	.donation-form .wlm-other-amount.focused,
	.donation-form .field.other-amount.focused {
		outline-width: 4px;
	}
}

/* ========================================
   Reduced Motion Support
   ======================================== */
@media (prefers-reduced-motion: reduce) {
	.donation-form .wlm-pill-button,
	.donation-form .wlm-other-amount,
	.donation-form .field.other-amount {
		transition: none;
	}
	
	.donation-form .wlm-pill-button:hover {
		transform: none;
	}
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
	.donation-form .wlm-pill-button.selected {
		background-color: transparent;
		color: #000;
		border-color: #000;
		font-weight: 700;
	}
	
	.donation-form .wlm-pill-button.selected::after {
		content: ' [SELECTED]';
	}
}
