/**
 * Donation Homepage Form - frontend styles.
 * Self-contained, no framework dependency (Bootstrap-free).
 */

.dhf-donation-form-wrap {
	--dhf-green: #1e6b3c;
	--dhf-green-dark: #144d2b;
	--dhf-green-light: #e9f5ee;
	--dhf-border: #d7e4dc;
	--dhf-text: #1f2a24;
	--dhf-error: #c0392b;
	max-width: 90%;
	margin: 0 auto;
	width: 100%;
	box-sizing: border-box;
}

.dhf-donation-form-wrap *,
.dhf-donation-form-wrap *::before,
.dhf-donation-form-wrap *::after {
	box-sizing: border-box;
}

.dhf-donation-form {
	/**background: transparent;
	border: 1px solid var(--dhf-border);
	border-radius: 14px;
	padding: 28px;
	box-shadow: 0 4px 18px rgba(20, 77, 43, 0.08); **/
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--dhf-text);
	display: flex;
    gap: 20px;
    align-items: end;
    justify-content: center;
}

.dhf-field {
	margin-bottom: 18px;
}

.dhf-field label {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
	color: var(--dhf-green-dark);
}

.dhf-required {
	color: var(--dhf-error);
}

.dhf-donation-form input[type="text"],
.dhf-donation-form input[type="number"],
.dhf-donation-form select {
	width: 100%;
	padding: 16px 12px;
	font-size: 16px;
	font-weight:500;
	border: 1px solid var(--dhf-border);
	border-radius: 8px;
	background: #fbfdfc;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
	line-height:1.5;
}

.dhf-donation-form input[type="text"]:focus,
.dhf-donation-form input[type="number"]:focus,
.dhf-donation-form select:focus {
	outline: none;
	border-color: var(--dhf-green);
}

.dhf-donation-form .select2-container {
	width: 100% !important;
}

.dhf-donation-form .select2-container .select2-selection--single {
	height: 40px;
	border: 1px solid var(--dhf-border);
	border-radius: 8px;
	margin:0 !important;
	width:220px;
}

.dhf-donation-form .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 40px;
}

.dhf-field.dhf-field--invalid label, .dhf-field.dhf-field--invalid input,
.dhf-field.dhf-field--invalid select,
.dhf-field.dhf-field--invalid .select2-selection {
	border-color: var(--dhf-error) !important;
	color: var(--dhf-error) !important;
}

.dhf-error {
	display: none;
	color: var(--dhf-error);
	font-size: 13px;
	margin-top: 5px;
}

.dhf-field--invalid .dhf-error {
	display: block;
}

.dhf-submit-btn {
	position: relative;
	width: 100%;
	background: var(--dhf-green);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	padding: 13px 18px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.02em;
	cursor: pointer;
	transition: background-color 0.15s ease, transform 0.05s ease;
}

.dhf-submit-btn:hover {
	background: var(--dhf-green-dark);
}

.dhf-submit-btn:active {
	transform: translateY(1px);
}

.dhf-submit-btn:disabled {
	opacity: 0.75;
	cursor: not-allowed;
}

.dhf-spinner {
	display: none;
	width: 16px;
	height: 16px;
	margin-left: 8px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #ffffff;
	border-radius: 50%;
	vertical-align: middle;
	animation: dhf-spin 0.7s linear infinite;
}

.dhf-submitting .dhf-spinner {
	display: inline-block;
}

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

.dhf-notice {
	margin-top: 16px;
	padding: 12px 14px;
	border-radius: 8px;
	font-size: 14px;
}

.dhf-notice-error {
	background: #fdecea;
	color: var(--dhf-error);
	border: 1px solid #f4c7c1;
}

.dhf-notice-success {
	background: var(--dhf-green-light);
	color: var(--dhf-green-dark);
	border: 1px solid #bfe0cc;
}

@media (max-width: 480px) {
	.dhf-donation-form {
		padding: 20px;
		border-radius: 10px;
		flex-direction:column;
		align-items:center;
	}
}
.dhf-style-preset{
    flex-direction:column !important;
    align-items: center !important;
}
.dhf-style-preset .dhf-field{
    width:100%;
}
.dhf-style-preset input[type="text"],
.dhf-style-preset input[type="number"],
.dhf-style-preset select {
	outline: none;
}

/* Preset Grid Layout */
.dhf-preset-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
	margin-bottom: 20px;
	width:100%;
}

.dhf-preset-btn {
	background: #ffffff !important;
	border: 1px solid #e0e0e0;
	color: #333333 !important;
	padding: 16px 10px;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	text-align: center;
}

.dhf-preset-btn:hover {
	border-color: #EEF2F0 !important;
	background: #EEF2F0 !important;
}

.dhf-preset-btn.active {
	background: #0f8b44 !important;
	color: #ffffff !important;;
	border-color: #0f8b44 !important;
}

/* Gray Input Field with Prefix */
.dhf-input-wrapper.dhf-has-prefix {
	position: relative;
	display: flex;
	align-items: center;
}

.dhf-currency-prefix {
	position: absolute;
	left: 15px;
	color: #666;
}

.dhf-style-preset input[type="number"]:read-only {
  background-color: #eeeeee;
  cursor: not-allowed;
}

.dhf-input.dhf-bg-grey {
	background-color: #e9ecef;
	border: 1px solid #ced4da;
	padding-left: 35px; /* Make room for the currency symbol */
}

/* Green Next Step Button */
.dhf-btn-green {
	background-color: #0f8b44;
	color: white;
	width: 200px;
	padding: 14px;
	border: none;
	border-radius: 6px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 10px;
}
.dhf-btn-green:hover {
	background-color: #0c7338;
}
