/* Donation Hub — frontend styles. Scoped under .dh- prefixes to avoid theme clashes. */

.dh-donation-card,
.dh-signup-card {
	max-width: 460px;
	margin: 1.5em auto;
	padding: 1.75em;
	border: 1px solid #e6e6e6;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 6px 24px rgba( 0, 0, 0, 0.06 );
	font-family: inherit;
}

.dh-card-title {
	margin: 0 0 1em;
	font-size: 1.25em;
	line-height: 1.3;
}

/* Amount grid */
.dh-amount-grid {
	display: grid;
	grid-template-columns: repeat( 3, 1fr );
	gap: 8px;
	margin-bottom: 1em;
}

.dh-amount-btn {
	padding: 0.7em 0.4em;
	border: 2px solid #d8d8d8;
	border-radius: 10px;
	background: #fafafa;
	font-size: 1em;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.15s ease;
	color: #222;
}

.dh-amount-btn:hover {
	border-color: #2ea44f;
}

.dh-amount-btn.is-active {
	border-color: #2ea44f;
	background: #2ea44f;
	color: #fff;
}

.dh-amount-custom {
	grid-column: span 3;
	padding: 0.7em;
	border: 2px solid #d8d8d8;
	border-radius: 10px;
	font-size: 1em;
	width: 100%;
	box-sizing: border-box;
}

/* Frequency toggle */
.dh-freq-toggle {
	display: flex;
	gap: 1.25em;
	margin-bottom: 1em;
	font-size: 0.95em;
}

.dh-freq-toggle label {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	cursor: pointer;
}

/* Fields */
.dh-field {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 0.75em;
	margin-bottom: 0.75em;
	border: 2px solid #d8d8d8;
	border-radius: 10px;
	font-size: 1em;
}

.dh-field:focus,
.dh-amount-custom:focus {
	outline: none;
	border-color: #2ea44f;
}

.dh-optin {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin-bottom: 1em;
	font-size: 0.9em;
	color: #555;
}

/* Buttons */
.dh-donate-btn,
.dh-subscribe-btn {
	display: block;
	width: 100%;
	padding: 0.9em;
	border: none;
	border-radius: 10px;
	background: #2ea44f;
	color: #fff;
	font-size: 1.05em;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, opacity 0.15s ease;
}

.dh-donate-btn:hover,
.dh-subscribe-btn:hover {
	background: #278742;
}

.dh-donate-btn:disabled,
.dh-subscribe-btn:disabled {
	opacity: 0.65;
	cursor: default;
}

.dh-donate-btn.is-loading::after,
.dh-subscribe-btn.is-loading::after {
	content: " …";
}

.dh-link-btn {
	text-align: center;
	text-decoration: none;
	margin-top: 0.75em;
}

/* Messages */
.dh-form-message {
	margin: 0.75em 0 0;
	font-size: 0.9em;
	min-height: 1.2em;
}

.dh-form-message.dh-error {
	color: #c0392b;
}

.dh-form-message.dh-success {
	color: #2ea44f;
}

/* Progress bar */
.dh-progress-wrap {
	margin-bottom: 1.25em;
}

.dh-progress-stats {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 0.5em;
	font-size: 0.9em;
	color: #555;
	gap: 0.5em;
}

.dh-raised strong {
	font-size: 1.15em;
	color: #222;
}

.dh-progress-bar {
	height: 12px;
	background: #ececec;
	border-radius: 8px;
	overflow: hidden;
}

.dh-progress-fill {
	display: block;
	height: 12px;
	background: linear-gradient( 90deg, #2ea44f, #35c95c );
	border-radius: 8px;
	transition: width 0.4s ease;
}

/* Campaign grid */
.dh-campaigns-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 280px, 1fr ) );
	gap: 1.5em;
	margin: 1.5em 0;
}

.dh-campaign-item {
	border: 1px solid #e6e6e6;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	padding-bottom: 1.25em;
}

.dh-campaign-thumb img {
	width: 100%;
	height: 170px;
	object-fit: cover;
	display: block;
}

.dh-campaign-item h4,
.dh-campaign-item p,
.dh-campaign-item .dh-progress-wrap,
.dh-campaign-item .dh-link-btn {
	margin-left: 1.25em;
	margin-right: 1.25em;
}

.dh-campaign-item h4 {
	margin-top: 1em;
}

/* Pop-up */
.dh-popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba( 0, 0, 0, 0.55 );
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	opacity: 0;
	transition: opacity 0.25s ease;
	padding: 1em;
}

.dh-popup-overlay.is-visible {
	opacity: 1;
}

.dh-popup-box {
	position: relative;
	max-width: 420px;
	width: 100%;
	background: #fff;
	border-radius: 16px;
	padding: 2em;
	box-shadow: 0 20px 60px rgba( 0, 0, 0, 0.3 );
	max-height: 90vh;
	overflow-y: auto;
}

.dh-popup-close {
	position: absolute;
	top: 12px;
	right: 14px;
	border: none;
	background: none;
	font-size: 1.7em;
	line-height: 1;
	cursor: pointer;
	color: #999;
}

.dh-popup-close:hover {
	color: #333;
}

.dh-popup-title {
	margin: 0 0 0.5em;
	font-size: 1.35em;
}

.dh-popup-message {
	margin: 0 0 1.25em;
	color: #555;
}

@media ( max-width: 480px ) {
	.dh-donation-card,
	.dh-signup-card {
		padding: 1.25em;
	}
}
