/* ==========================================================================
   BKA 2026 v5 · DONATION MODULE (brief item 12)
   Havi | Egyszeri segment (disabled while monthly giving is unavailable) ·
   amount chips · „Más összeg” becomes the amount field in exactly the same
   cell · TÁMOGATOM · then the same-origin checkout grows inside the same card.
   Nothing moves while choosing: every control has a fixed height.
   ========================================================================== */

.v5-donate {
	position: relative;
	padding: clamp(1.25rem, 1rem + .8vw, 1.85rem);
	border-radius: var(--v5-radius-lg);
	background: #fff;
	color: var(--v5-ink);
	box-shadow: var(--v5-shadow-float);
}
.v5-donate--panel { box-shadow: var(--v5-shadow-lift), 0 0 0 1px var(--v5-line); }
.v5-donate__notice { margin: 0 0 1rem; color: var(--v5-red-700); font-size: .875rem; font-weight: var(--v5-w-ui); }
.v5-donate__form { display: grid; gap: 1rem; margin: 0; }
.v5-donate__fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }

/* Havi | Egyszeri */
.v5-donate__frequency {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: .25rem;
	padding: .3rem;
	border-radius: var(--v5-radius-pill);
	background: var(--v5-mist);
}
.v5-donate__segment { position: relative; display: block; margin: 0; }
.v5-donate__segment input,
.v5-donate__chip input {
	position: absolute;
	z-index: 1;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.v5-donate__segment-face {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: .5rem;
	height: 2.85rem;
	border-radius: var(--v5-radius-pill);
	color: var(--v5-ink-soft);
	font-size: .9375rem;
	transition: background-color var(--v5-dur) var(--v5-ease), color var(--v5-dur) var(--v5-ease), box-shadow var(--v5-dur) var(--v5-ease);
}
.v5-donate__segment-face strong { font-weight: var(--v5-w-bold); letter-spacing: .02em; }
.v5-donate__segment-face .v5-icon { width: 1.05rem; height: 1.05rem; }
.v5-donate__segment input:checked + .v5-donate__segment-face {
	background: #fff;
	color: var(--v5-red);
	box-shadow: 0 6px 16px -8px rgba(17, 17, 26, .35);
}
.v5-donate__segment input:focus-visible + .v5-donate__segment-face { box-shadow: var(--v5-focus); }
.v5-donate__segment.is-disabled input { cursor: not-allowed; }
.v5-donate__segment.is-disabled .v5-donate__segment-face { color: #a4a2aa; }
.v5-donate__segment.is-disabled .v5-donate__segment-face strong { text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: rgba(164, 162, 170, .7); }

/* Amount chips */
.v5-donate__amounts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
.v5-donate__chip { position: relative; display: block; margin: 0; }
.v5-donate__chip-face {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 3.6rem;
	padding: 0 .75rem;
	border: 2px solid var(--v5-line);
	border-radius: 16px;
	background: #fff;
	color: var(--v5-ink);
	font-size: 1rem;
	font-weight: var(--v5-w-ui);
	line-height: 1;
	white-space: nowrap;
	transition: border-color var(--v5-dur) var(--v5-ease), background-color var(--v5-dur) var(--v5-ease), color var(--v5-dur) var(--v5-ease), box-shadow var(--v5-dur) var(--v5-ease);
}
.v5-donate__chip-label { display: inline; }
.v5-donate__chip-face strong { font-family: var(--v5-font-display); font-size: 1.5rem; font-weight: var(--v5-w-display); }
.v5-donate__chip--custom .v5-donate__chip-face strong { font-family: var(--v5-font-text); font-size: 1rem; font-weight: var(--v5-w-bold); }
.v5-donate__chip:hover .v5-donate__chip-face { border-color: var(--v5-red-200); }
.v5-donate__chip input:checked + .v5-donate__chip-face {
	border-color: var(--v5-red);
	background: var(--v5-red-50);
	color: var(--v5-red);
	box-shadow: inset 0 0 0 1px var(--v5-red);
}
.v5-donate__chip input:focus-visible + .v5-donate__chip-face { box-shadow: var(--v5-focus); }

/* „Más összeg” → field in place (absolute over the same cell: zero shift) */
.v5-donate__custom { position: relative; display: block; }
.v5-donate__custom-input {
	position: absolute;
	z-index: 2;
	inset: 0;
	display: flex;
	align-items: center;
	gap: .4rem;
	padding: 0 1rem;
	border: 2px solid var(--v5-red);
	border-radius: 16px;
	background: #fff;
	box-shadow: var(--v5-field-focus);
	animation: v5-pop .22s var(--v5-ease) both;
}
@keyframes v5-pop { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.v5-donate__custom-input input {
	width: 100%;
	min-width: 0;
	padding: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: var(--v5-red);
	font-family: var(--v5-font-display);
	font-size: 1.5rem;
	-moz-appearance: textfield;
	appearance: textfield;
}
.v5-donate__custom-input input::-webkit-outer-spin-button,
.v5-donate__custom-input input::-webkit-inner-spin-button { margin: 0; -webkit-appearance: none; }
.v5-donate__custom-input input:focus-visible { box-shadow: none; }
.v5-donate__custom-input input:invalid:not(:placeholder-shown) { color: var(--v5-red-700); }
.v5-donate__currency { color: var(--v5-red); font-weight: var(--v5-w-bold); }

.v5-donate__submit { width: 100%; margin-top: .2rem; }
.v5-donate__submit .v5-icon { transition: transform var(--v5-dur) var(--v5-ease); }
.v5-donate__submit:hover .v5-icon { transform: translateX(3px); }
.v5-donate__form.is-submitting .v5-donate__submit { opacity: .8; }

/* Step 2+: the checkout opens in the same card */
.v5-donate.is-checkout-open { padding: clamp(.75rem, .5rem + .6vw, 1.1rem); }
.v5-donate__checkout { position: relative; min-height: 22rem; }
.v5-donate__checkout::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 2.25rem;
	height: 2.25rem;
	margin: -1.125rem 0 0 -1.125rem;
	border: 3px solid var(--v5-red-100);
	border-top-color: var(--v5-red);
	border-radius: 50%;
	animation: v5-spin .8s linear infinite;
}
.v5-donate__checkout.is-loaded::before { display: none; }
@keyframes v5-spin { to { transform: rotate(360deg); } }
.v5-donate__frame {
	position: relative;
	display: block;
	width: 100%;
	height: 34rem;
	border: 0;
	background: transparent;
	opacity: 0;
	transition: opacity .25s var(--v5-ease);
}
.v5-donate__checkout.is-loaded .v5-donate__frame { opacity: 1; }
.v5-donate__back {
	position: absolute;
	z-index: 3;
	top: .35rem;
	right: .35rem;
	display: grid;
	place-items: center;
	width: 2.4rem;
	height: 2.4rem;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--v5-mist);
	color: var(--v5-ink);
	transition: background-color var(--v5-dur) var(--v5-ease), color var(--v5-dur) var(--v5-ease);
}
.v5-donate__back:hover { background: var(--v5-red); color: #fff; }

.v5-donate--unavailable { display: grid; place-items: center; min-height: 12rem; }

@media (max-width: 23rem) {
	.v5-donate__chip-face strong { font-size: 1.3rem; }
}
