/**
 * Custom Donation Checkout Shortcode Stylesheet
 *
 * Primary colors:
 * - Section yellow headers: #FFE600
 * - Active blue selection highlight: #0099FF
 */

.custom-donation-checkout-wrapper {
	max-width: 800px;
	margin: 40px auto;
	padding: 20px;
	background: #ffffff;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	border-radius: 8px;
	font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
	color: #333333;
}

/* Sections spacing */
.donation-section {
	margin-bottom: 40px;
	border: 1px solid #eaeaea;
	border-radius: 8px;
	overflow: hidden;
}

.donation-section:last-of-type {
	margin-bottom: 20px;
}

/* Numbered Yellow Banner Headers */
.donation-section-header {
	font-size: 1.3rem;
	margin: 0 0 .8em;
	background: #FFFF00;
	color: #000;
	padding: 15px;
	position: relative;
	line-height: 1.2;
	border-radius: 5px;
	font-weight: 700;
	display: flex;
	align-items: center;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.section-number {
	border-radius: 100%;
	display: inline-block;
	width: 26px;
	height: 26px;
	text-align: center;
	line-height: 26px;
	color: #0e2131;
	background: #fff;
	font-size: 1.1rem;
	margin-right: .5em;
	font-weight: 800;
}

.donation-section-content {
	padding: 24px;
	background: #ffffff;
}

/* Grids & Buttons */
.preset-amounts-grid,
.frequency-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.payment-methods-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

/* Standard Choice Buttons (Presets, Frequencies) */
.preset-btn,
.frequency-btn {
	position: relative;
	margin: 2px;
	border-radius: 5px;
	cursor: pointer;
	padding: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	width: 120px;
	height: 120px;
	background: #fdfdfd;
	border: 2px solid #dddddd;
	color: #444444;
	font-size: 16px;
	font-weight: 600;
	transition: all 0.2s ease-in-out;
	outline: none;
	box-sizing: border-box;
}

.payment-tile-btn {
	background: #fdfdfd;
	border: 2px solid #dddddd;
	border-radius: 6px;
	color: #444444;
	font-size: 16px;
	font-weight: 600;
	padding: 14px 10px;
	cursor: pointer;
	text-align: center;
	transition: all 0.2s ease-in-out;
	outline: none;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.preset-btn:hover,
.frequency-btn:hover,
.payment-tile-btn:hover {
	border-color: #09f;
	background: #f0f7ff;
	color: #09f;
}

/* Highlighting Active State in Solid Blue (#09f) with White Text */
.payment-tile-btn.active {
	background-color: #09f !important;
	border-color: #09f !important;
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(0, 153, 255, 0.3);
}

.preset-btn.active,
.frequency-btn.active {
	background: #09f !important;
	font-size: 25px !important;
	color: #fff !important;
	transform: scale(1);
	box-shadow: none !important;
	border-color: #09f !important;
}

/* Custom amount input */
.custom-amount-input-wrapper {
	position: relative;
	margin-top: 16px;
	max-width: 200px;
	display: flex;
	align-items: center;
}

.custom-amount-input-wrapper .currency-symbol {
	position: absolute;
	left: 14px;
	font-size: 18px;
	font-weight: 600;
	color: #555555;
	pointer-events: none;
}

.custom-amount-input-wrapper input {
	padding-left: 36px !important;
	font-size: 18px;
	font-weight: 600;
	color: #333333;
	border-radius: 6px;
	border: 2px solid #dddddd;
	width: 100%;
	height: 48px;
	transition: border-color 0.2s;
}

.custom-amount-input-wrapper input:focus {
	border-color: #0099FF;
	outline: none;
	background: #ffffff;
}

/* Payment Gateway Subfields & Description */
.payment-fields-wrapper {
	margin-top: 20px;
	padding: 16px;
	background: #f8f9fa;
	border: 1px dashed #dddddd;
	border-radius: 6px;
}

.gateway-fields-container {
	font-size: 14px;
	line-height: 1.5;
}

.gateway-no-fields-desc {
	margin: 0;
	color: #666666;
	font-style: italic;
}

/* Icons for payment gateways */
.payment-tile-icon {
	max-height: 32px;
	display: inline-flex;
	align-items: center;
}

.payment-tile-icon img {
	max-height: 28px;
	width: auto;
	object-fit: contain;
}

/* Form Controls & Labels */
.form-group {
	margin-bottom: 20px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.form-group label {
	font-size: 14px;
	font-weight: 600;
	color: #444444;
}

.form-control {
	width: 100%;
	height: 46px;
	padding: 10px 14px;
	font-size: 15px;
	border: 1px solid #cccccc;
	border-radius: 6px;
	background-color: #fafafa;
	transition: all 0.2s ease;
	box-sizing: border-box;
}

.form-control:focus {
	border-color: #0099FF;
	background-color: #ffffff;
	outline: none;
	box-shadow: 0 0 0 3px rgba(0, 153, 255, 0.15);
}

select.form-control {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml;utf8,<svg fill='%23666666' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px;
	padding-right: 36px;
}

textarea.form-control {
	height: auto;
	resize: vertical;
}

/* Customer fields layout */
.customer-info-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.customer-info-grid .company-checkbox-wrap,
.customer-info-grid #company-name-group {
	grid-column: span 2;
}

@media (max-width: 600px) {
	.customer-info-grid {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.customer-info-grid .company-checkbox-wrap,
	.customer-info-grid #company-name-group {
		grid-column: span 1;
	}
}

/* Custom Checkbox Design */
.checkbox-group {
	margin-bottom: 16px;
}

.custom-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	position: relative;
	user-select: none;
}

.custom-checkbox input[type="checkbox"] {
	position: absolute;
	opacity: 0;
	cursor: pointer;
	height: 0;
	width: 0;
}

.checkbox-indicator {
	width: 20px;
	height: 20px;
	background-color: #fafafa;
	border: 2px solid #cccccc;
	border-radius: 4px;
	display: inline-block;
	flex-shrink: 0;
	position: relative;
	transition: all 0.2s;
	margin-top: 2px;
}

.custom-checkbox:hover input ~ .checkbox-indicator {
	border-color: #0099FF;
}

.custom-checkbox input:checked ~ .checkbox-indicator {
	background-color: #0099FF;
	border-color: #0099FF;
}

.checkbox-indicator:after {
	content: "";
	position: absolute;
	display: none;
	left: 6px;
	top: 2px;
	width: 5px;
	height: 10px;
	border: solid white;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkbox-indicator:after {
	display: block;
}

.checkbox-label {
	font-size: 14px;
	font-weight: 500;
	color: #555555;
	line-height: 1.4;
}

.checkbox-label a {
	color: #0099FF;
	text-decoration: none;
	font-weight: 600;
}

.checkbox-label a:hover {
	text-decoration: underline;
}

/* Alerts and feedback states */
.donation-alert {
	padding: 12px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	margin-bottom: 20px;
	line-height: 1.4;
}

.donation-alert.alert-error {
	background-color: #fdf2f2;
	border-left: 4px solid #f05252;
	color: #c81e1e;
}

.donation-alert.alert-success {
	background-color: #f3faf7;
	border-left: 4px solid #0e9f6e;
	color: #03543f;
}

/* Submit Section & Loader */
.submit-wrap {
	display: flex;
	justify-content: center;
	margin-top: 10px;
}

#donation-submit-btn {
	background-color: #09f;
	border: none;
	color: #ffffff;
	font-size: 18px;
	font-weight: 700;
	padding: 16px 40px;
	border-radius: 8px;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 153, 255, 0.4);
	transition: all 0.2s ease-in-out;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-width: 250px;
}

#donation-submit-btn:hover {
	background-color: #0088ee;
	box-shadow: 0 6px 20px rgba(0, 153, 255, 0.5);
	transform: translateY(-1px);
}

#donation-submit-btn:active {
	transform: translateY(1px);
}

#donation-submit-btn:disabled {
	background-color: #a0d2f5;
	cursor: not-allowed;
	box-shadow: none;
}

/* Spinner Loader style */
.btn-loader {
	display: inline-flex;
	align-items: center;
}

.spinner {
	animation: rotate 2s linear infinite;
	width: 20px;
	height: 20px;
}

.spinner .path {
	stroke: #ffffff;
	stroke-linecap: round;
	animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
	100% {
		transform: rotate(360deg);
	}
}

@keyframes dash {
	0% {
		stroke-dasharray: 1, 150;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -35;
	}
	100% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -124;
	}
}

/* Field validation styles */
.form-control.input-error {
	border-color: #f05252;
	background-color: #fdf2f2;
}

.form-control.input-error:focus {
	box-shadow: 0 0 0 3px rgba(240, 82, 82, 0.15);
}
