/* Ek Asheche Kiran Foundation: site-wide Donate widget (floating button + modal).

   Donate + WhatsApp live as a vertically-centered stack fixed to the right
   edge of the viewport. Both anchor at `top: 50%; right: Npx` (no `bottom`,
   no `left`) and are pushed apart from the viewport's vertical centre with
   `transform: translateY(...)`. `translateY(-100%)` is relative to the
   element's OWN rendered height (a CSS percentage-in-transform rule), so this
   stays correctly stacked without knowing the exact auto height of either
   button. WhatsApp sits above centre, Donate sits below centre, with a fixed
   gap between them:
     WhatsApp  -> translateY(calc(-100% - GAP))   (bottom edge = centre - GAP)
     Donate    -> translateY(GAP)                 (top edge    = centre + GAP)
   Hover/focus lift is layered on top of the same base transform via calc(),
   never replacing it, so the lift nudge doesn't reset the stack position.

   This intentionally does not touch `.cd-top` (css/style.css:1069 —
   `position:fixed; bottom:50px; right:10px; height:40px; width:40px`), which
   stays pinned to the bottom-right and only fades in on scroll. A centre-right
   stack and a bottom-right corner icon don't share vertical space at any
   normal viewport height, so there is no collision to guard against the way
   the previous bottom-right-stacked layout needed to. See the report for the
   one short-viewport caveat (very tall sticky headers on landscape phones). */

.ekk-donate-fab {
	position: fixed;
	right: 18px;
	top: 50%;
	left: auto;
	bottom: auto;
	transform: translateY(10px);
	z-index: 1500;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 20px 13px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--ekk-orange-deep);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: .02em;
	cursor: pointer;
	box-shadow: 0 10px 26px rgba(194, 80, 15, .40);
	transition: transform .25s var(--ekk-ease), box-shadow .25s var(--ekk-ease), background .2s;
}
.ekk-donate-fab:hover,
.ekk-donate-fab:focus-visible { background: var(--ekk-ink); transform: translateY(calc(10px - 3px)); box-shadow: 0 14px 30px rgba(42, 33, 28, .36); }
.ekk-donate-fab svg { width: 20px; height: 20px; flex: none; }
.ekk-donate-fab .ekk-donate-pulse {
	position: absolute; inset: 0; border-radius: 999px;
	box-shadow: 0 0 0 0 rgba(194, 80, 15, .55);
	animation: ekkDonatePulse 2.6s ease-out infinite;
	pointer-events: none;
}
@keyframes ekkDonatePulse {
	0% { box-shadow: 0 0 0 0 rgba(194, 80, 15, .45); }
	70% { box-shadow: 0 0 0 14px rgba(194, 80, 15, 0); }
	100% { box-shadow: 0 0 0 0 rgba(194, 80, 15, 0); }
}

@media (max-width: 575px) {
	.ekk-donate-fab { right: 12px; transform: translateY(7px); padding: 12px 16px 12px 14px; font-size: 13px; }
	.ekk-donate-fab:hover, .ekk-donate-fab:focus-visible { transform: translateY(calc(7px - 3px)); }
}

/* ---------- WhatsApp floating button: upper half of the same right-centre stack ---------- */
.ekk-whatsapp-fab {
	position: fixed;
	right: 18px;
	top: 50%;
	left: auto;
	bottom: auto;
	transform: translateY(calc(-100% - 10px));
	z-index: 1400;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #25D366;
	color: #fff;
	box-shadow: 0 10px 26px rgba(37, 211, 102, .45);
	transition: transform .25s var(--ekk-ease, ease), box-shadow .25s var(--ekk-ease, ease);
}
.ekk-whatsapp-fab:hover,
.ekk-whatsapp-fab:focus-visible { transform: translateY(calc(-100% - 10px - 3px)); box-shadow: 0 14px 30px rgba(37, 211, 102, .55); color: #fff; }
.ekk-whatsapp-fab svg { width: 28px; height: 28px; flex: none; }

@media (max-width: 575px) {
	.ekk-whatsapp-fab { right: 12px; transform: translateY(calc(-100% - 7px)); width: 46px; height: 46px; }
	.ekk-whatsapp-fab:hover, .ekk-whatsapp-fab:focus-visible { transform: translateY(calc(-100% - 7px - 3px)); }
	.ekk-whatsapp-fab svg { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
	.ekk-whatsapp-fab { transition: none !important; }
}

/* ---------- overlay + modal ---------- */
.ekk-donate-overlay {
	position: fixed; inset: 0; z-index: 2000;
	display: flex; align-items: center; justify-content: center;
	padding: 20px;
	background: rgba(42, 33, 28, .62);
	opacity: 0; visibility: hidden;
	transition: opacity .25s var(--ekk-ease), visibility 0s linear .25s;
}
.ekk-donate-overlay.is-open { opacity: 1; visibility: visible; transition: opacity .25s var(--ekk-ease); }

.ekk-donate-modal {
	position: relative;
	width: 100%; max-width: 560px;
	max-height: 90vh; overflow-y: auto;
	background: #fff;
	border-radius: var(--ekk-radius);
	box-shadow: var(--ekk-shadow-lg);
	padding: 28px 26px 26px;
	transform: translateY(18px) scale(.97);
	transition: transform .28s var(--ekk-ease);
}
.ekk-donate-overlay.is-open .ekk-donate-modal { transform: translateY(0) scale(1); }

.ekk-donate-close {
	position: absolute; top: 14px; right: 14px;
	width: 36px; height: 36px; border-radius: 50%;
	border: 1px solid var(--ekk-line); background: #fff;
	color: var(--ekk-ink); font-size: 18px; line-height: 1;
	cursor: pointer; display: flex; align-items: center; justify-content: center;
	transition: background .2s, color .2s;
}
.ekk-donate-close:hover { background: var(--ekk-orange-deep); color: #fff; border-color: var(--ekk-orange-deep); }

.ekk-donate-head { padding-right: 34px; margin-bottom: 18px; }
.ekk-donate-head .ekk-eyebrow { display: block; color: var(--ekk-orange-deep); font-weight: 700; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.ekk-donate-head h2 { font-size: 22px; margin: 0 0 6px; color: var(--ekk-ink); }
.ekk-donate-head p { margin: 0; font-size: 14px; color: var(--ekk-text); }

.ekk-donate-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--ekk-line); margin-bottom: 20px; }
.ekk-donate-tab {
	flex: 1 1 auto; border: 0; background: none; cursor: pointer;
	padding: 10px 6px 14px; font-family: inherit; font-size: 13.5px; font-weight: 700;
	color: var(--ekk-text); border-bottom: 3px solid transparent;
	display: flex; align-items: center; justify-content: center; gap: 7px;
}
.ekk-donate-tab svg { width: 17px; height: 17px; }
.ekk-donate-tab[aria-selected="true"] { color: var(--ekk-orange-deep); border-color: var(--ekk-orange-deep); }

.ekk-donate-panel { display: none; }
.ekk-donate-panel.is-active { display: block; animation: ekkFadeIn .25s var(--ekk-ease); }
@keyframes ekkFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.ekk-donate-qr-wrap { text-align: center; }
.ekk-donate-qr-wrap img { width: 220px; max-width: 72%; border-radius: 12px; box-shadow: var(--ekk-shadow); margin: 0 auto 14px; display: block; }
.ekk-donate-upi-row {
	display: flex; align-items: center; justify-content: center; gap: 10px;
	flex-wrap: wrap; margin-bottom: 6px;
}
.ekk-donate-upi-id { font-weight: 700; color: var(--ekk-ink); background: var(--ekk-cream); border: 1px dashed var(--ekk-line); border-radius: 8px; padding: 7px 12px; font-size: 13.5px; }
.ekk-donate-note { text-align: center; font-size: 12.5px; color: var(--ekk-text); margin-top: 10px; }

.ekk-donate-copy {
	border: 1px solid var(--ekk-orange-deep); color: var(--ekk-orange-deep); background: #fff;
	border-radius: 8px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer;
	display: inline-flex; align-items: center; gap: 6px; transition: background .2s, color .2s;
}
.ekk-donate-copy:hover { background: var(--ekk-orange-deep); color: #fff; }
.ekk-donate-copy.is-copied { background: var(--ekk-green); border-color: var(--ekk-green); color: #fff; }

.ekk-donate-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ekk-donate-table tr { border-bottom: 1px solid var(--ekk-line); }
.ekk-donate-table tr:last-child { border-bottom: 0; }
.ekk-donate-table th, .ekk-donate-table td { text-align: left; padding: 9px 4px; vertical-align: middle; }
.ekk-donate-table th { font-weight: 600; color: var(--ekk-text); width: 42%; }
.ekk-donate-table td { color: var(--ekk-ink); font-weight: 700; }
.ekk-donate-table td .ekk-donate-copy { margin-left: 8px; padding: 4px 10px; font-size: 11.5px; }
.ekk-donate-table .ekk-donate-cell { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.ekk-donate-contact { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--ekk-line); font-size: 13px; color: var(--ekk-text); }
.ekk-donate-contact a { color: var(--ekk-orange-deep); font-weight: 700; }
.ekk-donate-contact strong { color: var(--ekk-ink); }

@media (prefers-reduced-motion: reduce) {
	.ekk-donate-fab, .ekk-donate-overlay, .ekk-donate-modal, .ekk-donate-panel.is-active { animation: none !important; transition: none !important; }
	.ekk-donate-fab .ekk-donate-pulse { display: none; }
}
