/**
 * FRDP PK — donation flow (appeals, cart, checkout).
 *
 * Prefixed fpkd- so nothing here can reach into the rest of the theme.
 * Phase 4 gives these pages a working, readable shape; the full visual
 * treatment lands with the frontend rebuild.
 */

/* The quick-give card in the hero reuses the amount chips, so it has to be in
   this list — a var() that resolves nowhere leaves the selected chip with no
   background at all, which is how it rendered as an empty white pill. */
.fpkd-causes,
.fpkd-cart,
.fpkd-checkout,
.ow-quick {
	--fpkd-primary: #50155b;
	--fpkd-primary-2: #7a2f9e;
	--fpkd-accent: #d90429;
	--fpkd-line: #e8e3ee;
	--fpkd-muted: #6f6879;
	--fpkd-radius: 12px;
	font-size: 15px;
	color: #2b2731;
}

/* ---------- appeals ---------- */
.fpkd-causes {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
	gap: 26px;
	align-items: stretch;
}

.fpkd-cause {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--fpkd-line);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 2px 10px rgba(45, 15, 55, .05);
	transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.fpkd-cause:hover {
	transform: translateY(-4px);
	border-color: #dcc9e6;
	box-shadow: 0 18px 38px rgba(80, 21, 91, .14);
}

.fpkd-cause__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, var(--fpkd-primary), var(--fpkd-primary-2));
	overflow: hidden;
}
.fpkd-cause__media img {
	width: 100%; height: 100%;
	object-fit: cover; display: block;
	transition: transform .5s ease;
}
.fpkd-cause:hover .fpkd-cause__media img { transform: scale(1.06); }

.fpkd-badge {
	position: absolute; top: 12px; left: 12px;
	padding: 5px 12px; border-radius: 30px;
	background: rgba(255, 255, 255, .94);
	color: var(--fpkd-primary);
	font-size: 11px; font-weight: 700; letter-spacing: .3px;
	backdrop-filter: blur(6px);
}

.fpkd-cause__body {
	padding: 18px 18px 20px;
	display: flex; flex-direction: column; flex: 1;
}

.fpkd-cause__title {
	color: var(--fpkd-primary);
	font-size: 18px; font-weight: 700; line-height: 1.35;
	margin: 0 0 7px;
}

.fpkd-cause__text {
	font-size: 13.5px; line-height: 1.65;
	color: var(--fpkd-muted);
	margin: 0 0 14px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- amount chips ---------- */
.fpkd-pick { margin-bottom: 14px; }

.fpkd-pick__label {
	display: block;
	font-size: 10.5px; font-weight: 800;
	letter-spacing: 1.1px; text-transform: uppercase;
	color: var(--fpkd-muted);
	margin-bottom: 9px;
}

.fpkd-chips { display: flex; flex-wrap: wrap; gap: 7px; }

.fpkd-chip { position: relative; cursor: pointer; }

/* Off-screen rather than display:none — a hidden input is skipped by keyboard
 * navigation, so the amounts would become unreachable without a mouse. */
.fpkd-chip input {
	position: absolute; opacity: 0;
	width: 1px; height: 1px; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
}

.fpkd-chip span {
	display: block;
	padding: 8px 14px;
	border: 1.5px solid var(--fpkd-line);
	border-radius: 30px;
	font-size: 13px; font-weight: 700;
	color: #4a4453; white-space: nowrap;
	transition: all .2s ease;
}
.fpkd-chip span::before { content: "PKR "; font-weight: 500; opacity: .6; font-size: 11px; }
.fpkd-chip--other span::before { content: none; }

.fpkd-chip:hover span { border-color: #cbb4d9; background: #fdfbfe; }

.fpkd-chip input:checked + span {
	background: var(--fpkd-primary);
	border-color: var(--fpkd-primary);
	color: #fff;
	box-shadow: 0 4px 12px rgba(80, 21, 91, .3);
}
.fpkd-chip input:checked + span::before { opacity: .75; }

.fpkd-chip input:focus-visible + span {
	outline: 2px solid var(--fpkd-primary-2);
	outline-offset: 2px;
}

.fpkd-custom {
	display: flex; align-items: center; gap: 8px;
	margin-top: 10px;
	padding: 4px 4px 4px 13px;
	border: 1.5px solid var(--fpkd-primary);
	border-radius: 10px;
	background: #faf5fc;
}
.fpkd-custom__cur { font-size: 12.5px; font-weight: 700; color: var(--fpkd-primary); }
.fpkd-custom .fpkd-input { border: 0; background: transparent; padding: 7px 4px; font-weight: 700; }
.fpkd-custom .fpkd-input:focus { box-shadow: none; }

.fpkd-desc {
	margin: 11px 0 0;
	font-size: 12.5px; line-height: 1.6;
	color: var(--fpkd-muted);
	min-height: 40px;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- the plaque ---------- */
/* Urdu and Arabic boxes open once a name is typed; "On the plaque" shows the
   lines in the order they are written — Urdu, Arabic, English. */
.fpkd-plaque {
	margin: 2px 0 14px;
	padding-top: 14px;
	border-top: 1px solid var(--fpkd-line);
}
.fpkd-plaque [hidden] { display: none !important; }

.fpkd-plaque__main,
.fpkd-plaque__box { position: relative; }

.fpkd-plaque__langs {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 10px;
	animation: fpkd-rise .22s ease both;
}
.fpkd-plaque__ask { margin-right: 2px; color: var(--fpkd-muted); font-size: 12.5px; font-weight: 600; }

.fpkd-plaque__lang { position: relative; cursor: pointer; }
.fpkd-plaque__lang input {
	position: absolute; opacity: 0;
	width: 1px; height: 1px; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
}
.fpkd-plaque__lang span {
	display: inline-flex; align-items: center; gap: 7px;
	padding: 6px 12px;
	border: 1.5px solid var(--fpkd-line);
	border-radius: 30px;
	background: #fff;
	color: #4a4453;
	font-size: 13px; font-weight: 600;
	transition: border-color .18s ease, background .18s ease, color .18s ease;
}
/* The box drawn in, so the tick reads the same on every browser. */
.fpkd-plaque__lang span::before {
	content: "";
	width: 15px; height: 15px;
	border: 1.5px solid #c9bdd4;
	border-radius: 4px;
	background: #fff center / 10px no-repeat;
	transition: background-color .18s ease, border-color .18s ease;
}
.fpkd-plaque__lang:hover span { border-color: #cbb4d9; }
.fpkd-plaque__lang input:checked + span { border-color: var(--fpkd-primary); background: #f7f1fa; color: var(--fpkd-primary); }
.fpkd-plaque__lang input:checked + span::before {
	border-color: var(--fpkd-primary);
	background-color: var(--fpkd-primary);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2l3.3 3.3L11 1.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.fpkd-plaque__lang input:focus-visible + span { outline: 2px solid var(--fpkd-primary-2); outline-offset: 2px; }

.fpkd-plaque__boxes {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0 10px;   /* each box keeps its own space above */
}
.fpkd-plaque__box { margin-top: 10px; animation: fpkd-rise .22s ease both; }
.fpkd-plaque__box .fpkd-input { font-size: 15px; }
/* While the translation is on its way. */
.fpkd-plaque__box.is-busy .fpkd-input {
	background: linear-gradient(90deg, #fff 0%, #f5eef9 50%, #fff 100%) 0 0 / 200% 100%;
	animation: fpkd-shimmer 1.1s linear infinite;
}
.fpkd-plaque__note { margin: 5px 0 0; color: var(--fpkd-muted); font-size: 12px; line-height: 1.5; }

.fpkd-plaque .is-invalid .fpkd-input { border-color: #d63a3a; }
.fpkd-plaque .is-invalid .fpkd-input:focus { box-shadow: 0 0 0 3px rgba(214, 58, 58, .14); }

.fpkd-plaque__preview {
	margin-top: 12px;
	padding: 10px 14px 12px;
	border: 2px solid var(--fpkd-primary);
	border-radius: 10px;
	background: #fff;
	text-align: center;
	box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px rgba(80, 21, 91, .18);
	animation: fpkd-rise .22s ease both;
}
.fpkd-plaque__preview-label {
	display: block;
	margin-bottom: 4px;
	color: var(--fpkd-muted);
	font-size: 10px; font-weight: 800;
	letter-spacing: 1.1px; text-transform: uppercase;
}
.fpkd-plaque__lines p { margin: 0; color: var(--fpkd-primary); font-size: 14.5px; font-weight: 700; line-height: 1.6; overflow-wrap: anywhere; }
.fpkd-plaque__lines p[dir="rtl"] { font-size: 16px; }

@keyframes fpkd-rise { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes fpkd-shimmer { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) {
	.fpkd-plaque__langs, .fpkd-plaque__box, .fpkd-plaque__preview { animation: none; }
	.fpkd-plaque__box.is-busy .fpkd-input { animation: none; background: #f7f1fa; }
}

/* ---------- card footer ---------- */

/* The form wraps everything below the title, so it — not the footer — is the
 * flex child of the card body. Without this the footer's margin-top:auto has
 * no free space to push into, and a card with fewer amount chips ends up with
 * its Donate button floating partway up while its neighbours sit at the
 * bottom. */
.fpkd-form {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.fpkd-cause__foot {
	display: flex; gap: 9px; align-items: center;
	margin-top: auto; padding-top: 4px;
}

.fpkd-stepper {
	display: flex; align-items: center;
	border: 1.5px solid var(--fpkd-line);
	border-radius: 10px;
	overflow: hidden;
	flex-shrink: 0;
}
.fpkd-stepper__btn {
	width: 30px; height: 40px;
	border: 0; background: #fff;
	font-size: 15px; color: var(--fpkd-primary);
	cursor: pointer; line-height: 1;
	transition: background .18s ease;
}
.fpkd-stepper__btn:hover { background: #f5eef8; }
.fpkd-stepper__input {
	width: 34px; height: 40px;
	border: 0; text-align: center;
	font: inherit; font-size: 14px; font-weight: 700;
	-moz-appearance: textfield;
}
.fpkd-stepper__input::-webkit-outer-spin-button,
.fpkd-stepper__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fpkd-stepper__input:focus { outline: none; }

.fpkd-btn--grow { flex: 1; height: 40px; padding: 0 16px; }

/* ---------- fields ---------- */
.fpkd-field { margin-bottom: 14px; flex: 1; }
.fpkd-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.fpkd-hint { font-size: 12.5px; color: var(--fpkd-muted); }
.fpkd-hint--center { text-align: center; margin-top: 12px; }
.fpkd-req { color: var(--fpkd-accent); }
.fpkd-row { display: flex; gap: 12px; flex-wrap: wrap; }

.fpkd-input {
	width: 100%;
	padding: 10px 13px;
	border: 1px solid var(--fpkd-line);
	border-radius: 9px;
	font: inherit; font-size: 14px;
	background: #fff;
	transition: border-color .18s ease, box-shadow .18s ease;
}
.fpkd-input:focus {
	outline: none;
	border-color: var(--fpkd-primary-2);
	box-shadow: 0 0 0 3px rgba(122, 47, 158, .12);
}
.fpkd-input--narrow { width: 120px; flex: 0 0 120px; }
.fpkd-input--inline { width: 130px; }
textarea.fpkd-input { resize: vertical; line-height: 1.6; }

.fpkd-check {
	display: flex; align-items: flex-start; gap: 9px;
	font-size: 13.5px; line-height: 1.6; margin-bottom: 12px; cursor: pointer;
}
.fpkd-check input { accent-color: var(--fpkd-primary); margin-top: 3px; flex-shrink: 0; }

/* ---------- buttons ---------- */
.fpkd-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 12px 22px;
	border: 1px solid transparent; border-radius: 10px;
	background: linear-gradient(135deg, var(--fpkd-primary), var(--fpkd-primary-2));
	color: #fff !important;
	font: inherit; font-size: 14px; font-weight: 600;
	cursor: pointer; text-decoration: none; white-space: nowrap;
	transition: transform .15s ease, box-shadow .15s ease;
}
.fpkd-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(80, 21, 91, .28); }
.fpkd-btn--block { width: 100%; margin-top: 8px; }
.fpkd-btn--ghost {
	background: #fff; color: var(--fpkd-primary) !important; border-color: var(--fpkd-line);
}
.fpkd-btn--ghost:hover { box-shadow: none; background: #faf6fc; }


/* ---------- steps ---------- */
.fpkd-steps {
	display: flex; flex-wrap: wrap; gap: 10px;
	list-style: none; margin: 0 0 26px; padding: 0;
	counter-reset: step;
}
.fpkd-steps__item {
	display: flex; align-items: center; gap: 9px;
	font-size: 13px; font-weight: 600;
	color: var(--fpkd-muted);
}
.fpkd-steps__item + .fpkd-steps__item::before {
	content: ""; width: 26px; height: 1.5px;
	background: var(--fpkd-line); margin-right: 1px;
}
.fpkd-steps__num {
	width: 24px; height: 24px; flex: 0 0 24px;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%;
	background: #efeaf3; color: var(--fpkd-muted);
	font-size: 11.5px; font-weight: 800;
}
.fpkd-steps__item.is-current { color: var(--fpkd-primary); }
.fpkd-steps__item.is-current .fpkd-steps__num { background: var(--fpkd-primary); color: #fff; }
.fpkd-steps__item.is-done { color: #3f7d5e; }
.fpkd-steps__item.is-done .fpkd-steps__num { background: #d8f0e3; color: #17935c; }

/* ---------- cart / checkout layout ---------- */
.fpkd-cart__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: 26px;
	align-items: start;
}

.fpkd-lines { display: flex; flex-direction: column; gap: 14px; }

.fpkd-line {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr) auto;
	gap: 16px;
	align-items: center;
	padding: 16px;
	background: #fff;
	border: 1px solid var(--fpkd-line);
	border-radius: 14px;
	transition: border-color .2s ease, box-shadow .2s ease;
}
.fpkd-line:hover { border-color: #dcc9e6; box-shadow: 0 6px 18px rgba(45, 15, 55, .06); }

.fpkd-line__thumb {
	width: 84px; height: 84px;
	border-radius: 10px; overflow: hidden;
	background: linear-gradient(135deg, var(--fpkd-primary), var(--fpkd-primary-2));
}
.fpkd-line__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fpkd-line__title {
	margin: 0 0 3px;
	font-size: 15px; font-weight: 700;
	color: var(--fpkd-primary); line-height: 1.35;
}
.fpkd-line__tier {
	margin: 0 0 6px;
	font-size: 12.5px; line-height: 1.55; color: var(--fpkd-muted);
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.fpkd-line__unit { margin: 6px 0 0; font-size: 12px; color: var(--fpkd-muted); }
.fpkd-line__tags { display: flex; flex-wrap: wrap; gap: 5px; }

.fpkd-tag {
	display: inline-block;
	padding: 2px 9px; border-radius: 5px;
	background: #f2e8f7; color: var(--fpkd-primary);
	font-size: 11px; font-weight: 600;
}
/* A plaque can carry three names; they wrap rather than run off the line. */
.fpkd-tag--plaque { max-width: 100%; line-height: 1.6; overflow-wrap: anywhere; }
.fpkd-tag--plaque [dir="rtl"],
.fpkd-summary-line__plaque [dir="rtl"] { font-size: 1.1em; }
.fpkd-summary-line__plaque { margin-top: 2px; color: var(--fpkd-primary); font-weight: 600; }

.fpkd-line__controls {
	display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
}
.fpkd-line__total { font-size: 15px; font-weight: 800; color: #2b2731; white-space: nowrap; }
.fpkd-line__remove {
	background: none; border: 0; padding: 0; cursor: pointer;
	font: inherit; font-size: 12px; color: var(--fpkd-muted);
	text-decoration: underline; text-underline-offset: 2px;
}
.fpkd-line__remove:hover { color: var(--fpkd-accent); }

.fpkd-lines__foot {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; flex-wrap: wrap; margin-top: 4px;
}

/* ---------- side panel ---------- */
.fpkd-panel {
	background: #faf8fc;
	border: 1px solid var(--fpkd-line);
	border-radius: 14px;
	padding: 20px;
	/* Clear of the header, which floats over the page and returns on a scroll up. */
	position: sticky; top: 96px;
}
.fpkd-panel__title {
	margin: 0 0 14px;
	font-size: 15px; font-weight: 700; color: var(--fpkd-primary);
}
.fpkd-panel__title--spaced { margin-top: 24px; }
.fpkd-optional {
	font-size: 11px; font-weight: 600; text-transform: uppercase;
	letter-spacing: .6px; color: var(--fpkd-muted);
	background: #efeaf3; padding: 2px 8px; border-radius: 20px;
	vertical-align: middle;
}

.fpkd-fee {
	display: flex; gap: 10px; align-items: flex-start;
	padding: 12px; margin-bottom: 14px;
	background: #fff; border: 1px solid var(--fpkd-line); border-radius: 10px;
	font-size: 12.5px; line-height: 1.55; cursor: pointer;
}
.fpkd-fee input { accent-color: var(--fpkd-primary); margin-top: 2px; flex-shrink: 0; }
.fpkd-fee b { display: block; font-size: 13px; color: #2b2731; margin-bottom: 2px; }
.fpkd-fee span { color: var(--fpkd-muted); }

.fpkd-summary-line {
	display: flex; justify-content: space-between; gap: 12px;
	padding: 10px 0; border-bottom: 1px solid var(--fpkd-line);
	font-size: 13px;
}

.fpkd-summary {
	margin: 14px 0 16px;
	display: grid; grid-template-columns: 1fr auto;
	gap: 8px 20px; font-size: 13.5px;
}
.fpkd-summary dt { color: var(--fpkd-muted); }
.fpkd-summary dd { margin: 0; text-align: right; }
.fpkd-summary__total {
	font-size: 17px; font-weight: 800; color: var(--fpkd-primary);
	padding-top: 11px; border-top: 1px solid var(--fpkd-line);
}

.fpkd-trust {
	margin: 14px 0 0;
	font-size: 11.5px; line-height: 1.6; color: var(--fpkd-muted);
	text-align: center;
}

/* ---------- checkout form ---------- */
.fpkd-form-card {
	background: #fff;
	border: 1px solid var(--fpkd-line);
	border-radius: 14px;
	padding: 22px;
}
.fpkd-submit-row {
	display: flex; align-items: center; justify-content: space-between;
	gap: 14px; flex-wrap: wrap;
	margin-top: 20px; padding-top: 18px;
	border-top: 1px solid var(--fpkd-line);
}
.fpkd-back { font-size: 13px; text-decoration: none; color: var(--fpkd-primary); font-weight: 600; }
.fpkd-back:hover { text-decoration: underline; }

.fpkd-form-card__lead { margin: -6px 0 18px; }
.fpkd-form-card .fpkd-btn.is-busy { opacity: .8; cursor: progress; }

/* Country: a native list, so a phone shows its own picker; the arrow drawn in. */
.fpkd-select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 38px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%236f6879' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
	cursor: pointer;
	text-overflow: ellipsis;
}
.fpkd-select:has(option[value=""]:checked) { color: var(--fpkd-muted); }
.fpkd-select option { color: #2b2731; }

/* A field the donor has to fix. */
.fpkd-field.is-invalid .fpkd-input { border-color: #d63a3a; }
.fpkd-field.is-invalid .fpkd-input:focus { box-shadow: 0 0 0 3px rgba(214, 58, 58, .14); }
.fpkd-error {
	margin: 6px 0 0;
	color: #c42f2f;
	font-size: 12.5px;
	font-weight: 500;
}

/* Phone: intl-tel-input's flag and dial code, sitting inside the field. */
.fpkd-checkout {
	--iti-border-color: var(--fpkd-line);
	--iti-hover-color: rgba(122, 47, 158, .08);
	--iti-arrow-color: #6f6879;
	--iti-dialcode-color: #2b2731;
	--iti-dropdown-bg: #fff;
	--iti-spacer-horizontal: 10px;
}
.fpkd-checkout .iti { display: block; width: 100%; }
.fpkd-checkout .iti__country-container { padding: 1px; }
.fpkd-checkout .iti__selected-country {
	border-right: 1px solid var(--fpkd-line);
	border-radius: 8px 0 0 8px;
	background: #faf8fc;
	transition: background .18s ease;
}
.fpkd-checkout .iti__selected-country:hover,
.fpkd-checkout .iti__selected-country[aria-expanded="true"] { background: #f3edf8; }
.fpkd-checkout .iti__selected-country-primary { padding: 0 8px 0 12px; }
.fpkd-checkout .iti__selected-dial-code { margin-left: 8px; font-size: 14px; font-weight: 600; }
.fpkd-checkout .iti__dropdown-content {
	margin-top: 6px;
	border: 1px solid var(--fpkd-line);
	border-radius: 12px;
	box-shadow: 0 18px 44px rgba(45, 15, 55, .16);
	overflow: hidden;
}
.fpkd-checkout .iti__search-input {
	padding: 11px 14px;
	border: 0;
	border-bottom: 1px solid var(--fpkd-line);
	font: inherit;
	font-size: 14px;
}
.fpkd-checkout .iti__search-input:focus { outline: none; background: #faf8fc; }
.fpkd-checkout .iti__country-list { max-height: 260px; font-size: 14px; }
.fpkd-checkout .iti__country { padding: 9px 14px; }
.fpkd-checkout .iti__country.iti__highlight { background: #f3edf8; }
.fpkd-checkout .iti__dial-code { color: var(--fpkd-muted); }

/* On a phone the country list takes the whole screen, hung off <body> rather
 * than the form, so it is styled here and not under .fpkd-checkout. */
.iti--fullscreen-popup.iti--container { padding: 24px 16px; background: rgba(30, 10, 40, .55); }
.iti--fullscreen-popup .iti__dropdown-content { border-radius: 14px; overflow: hidden; }
.iti--fullscreen-popup .iti__search-input {
	padding: 13px 16px;
	border: 0;
	border-bottom: 1px solid #e8e3ee;
	font: inherit;
	font-size: 15px;
}
.iti--fullscreen-popup .iti__search-input:focus { outline: none; background: #faf8fc; }
.iti--fullscreen-popup .iti__country { padding: 11px 16px; font-size: 15px; }
.iti--fullscreen-popup .iti__country.iti__highlight { background: #f3edf8; }

/* ---------- notices & empty ---------- */
.fpkd-notice {
	padding: 13px 16px; border-radius: 10px;
	margin-bottom: 20px; font-size: 14px; line-height: 1.6;
}
.fpkd-notice--success { background: #e4f5ec; color: #0f6d42; border: 1px solid #c4e8d5; }
.fpkd-notice--error { background: #fdecec; color: #b32a23; border: 1px solid #f6cfcd; }

.fpkd-empty-state {
	text-align: center; padding: 56px 20px;
	background: #faf8fc; border: 1px solid var(--fpkd-line); border-radius: 14px;
}
.fpkd-empty-state__icon { font-size: 40px; color: #cbb4d9; display: block; margin-bottom: 12px; }
.fpkd-empty-state h3 { margin: 0 0 6px; font-size: 18px; color: var(--fpkd-primary); }
.fpkd-empty-state p { color: var(--fpkd-muted); margin: 0 0 20px; font-size: 14px; }
.fpkd-empty { color: var(--fpkd-muted); }

.fpkd-btn--sm { padding: 8px 15px; font-size: 13px; }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
	.fpkd-cart__grid { grid-template-columns: 1fr; }
	.fpkd-panel { position: static; }
}

@media (max-width: 620px) {
	.fpkd-causes { grid-template-columns: 1fr; }
	.fpkd-row { flex-direction: column; gap: 0; }
	.fpkd-input--narrow { width: 100%; flex-basis: auto; }

	/* The line becomes thumbnail + text, with the controls on their own row —
	 * three columns cannot hold a stepper and a total at this width. */
	.fpkd-line { grid-template-columns: 64px minmax(0, 1fr); gap: 12px; }
	.fpkd-line__thumb { width: 64px; height: 64px; }
	.fpkd-line__controls {
		grid-column: 1 / -1;
		flex-direction: row; align-items: center; justify-content: space-between;
		padding-top: 12px; border-top: 1px solid var(--fpkd-line);
	}
	.fpkd-submit-row, .fpkd-lines__foot { flex-direction: column-reverse; align-items: stretch; }
	.fpkd-submit-row .fpkd-btn { width: 100%; }
	.fpkd-submit-row .fpkd-back, .fpkd-lines__foot .fpkd-back { text-align: center; }
	.fpkd-steps__item + .fpkd-steps__item::before { width: 14px; }
	.fpkd-steps { font-size: 12px; }
}

/* =========================================================
   SLIDE-OUT CART
   A <dialog>, so the browser supplies the modal behaviour:
   Escape, focus containment, and the rest of the page inert.
   ========================================================= */

.fpkd-drawer {
	--fpkd-primary: #50155b;
	--fpkd-primary-2: #7a2f9e;
	--fpkd-accent: #d90429;
	--fpkd-line: #e8e3ee;
	--fpkd-muted: #6f6879;

	/* The dialog itself is the full-screen layer; the panel inside is the card
	   that slides. Sizing it this way keeps the backdrop clickable.

	   Size comes from inset, not width/height. The UA stylesheet gives a modal
	   dialog its own max-width/max-height (calc(100% - 6px - 2em)), which
	   fights a 100% width and collapsed the whole thing to 0x0. */
	position: fixed;
	inset: 0;
	width: auto;
	height: auto;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: hidden;
	font-family: 'Poppins', system-ui, sans-serif;
	color: #2b2731;
}

/* The backdrop and the panel are driven by one class rather than a keyframe on
   [open]. An animation only plays when the element first appears, so adding to
   a cart that was already open produced no movement at all — and a transition
   can also be interrupted and reversed part-way, which a keyframe cannot. */
.fpkd-drawer::backdrop {
	background: rgba(30, 27, 36, .5);
	backdrop-filter: blur(3px);
	opacity: 0;
	transition: opacity .38s ease;
}

.fpkd-drawer.is-open::backdrop { opacity: 1; }

/* Motion is a nicety; someone who has asked for less should not get a panel
   flying in at them. */
@media (prefers-reduced-motion: reduce) {
	.fpkd-drawer::backdrop,
	.fpkd-drawer__panel,
	.fpkd-dline,
	.cart-btn { transition: none !important; animation: none !important; }
}

.fpkd-drawer__panel {
	margin-left: auto;
	width: min(420px, 100%);
	height: 100%;
	background: #fff;
	box-shadow: -20px 0 60px rgba(30, 27, 36, .22);
	display: flex;
	flex-direction: column;

	/* Starts off-screen and slides in when .is-open lands, one frame after the
	   dialog opens. Slightly slower on the way in than out, which is how a
	   panel reads as arriving rather than snapping. */
	transform: translateX(100%);
	transition: transform .34s cubic-bezier(.32, .72, 0, 1);
	will-change: transform;
}

.fpkd-drawer.is-open .fpkd-drawer__panel { transform: translateX(0); }

.fpkd-drawer__head {
	display: flex; align-items: center; gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--fpkd-line);
	flex-shrink: 0;
}
.fpkd-drawer__title {
	margin: 0; flex: 1;
	display: flex; align-items: center; gap: 9px;
	font-size: 17px; font-weight: 700; color: var(--fpkd-primary);
}
.fpkd-drawer__count {
	min-width: 22px; height: 22px; padding: 0 7px;
	border-radius: 20px;
	background: var(--fpkd-accent); color: #fff;
	font-size: 11.5px; font-weight: 700; line-height: 22px; text-align: center;
}
.fpkd-drawer__close {
	width: 34px; height: 34px; flex-shrink: 0;
	border: 0; border-radius: 9px; background: #f5f2f8;
	font-size: 22px; line-height: 1; color: var(--fpkd-muted);
	cursor: pointer; transition: background .18s ease, color .18s ease;
}
.fpkd-drawer__close:hover { background: #ece5f1; color: var(--fpkd-primary); }

.fpkd-drawer__form { display: flex; flex-direction: column; flex: 1; min-height: 0; }

.fpkd-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 16px 20px;
	display: flex; flex-direction: column; gap: 12px;
}

.fpkd-drawer__foot {
	flex-shrink: 0;
	padding: 16px 20px 20px;
	border-top: 1px solid var(--fpkd-line);
	background: #faf8fc;
}
.fpkd-drawer__foot .fpkd-summary { margin: 12px 0 14px; }
.fpkd-drawer__foot .fpkd-fee { margin-bottom: 0; }

.fpkd-drawer__links {
	display: flex; align-items: center; justify-content: space-between;
	gap: 12px; margin-top: 12px;
}
.fpkd-linkbtn {
	background: none; border: 0; padding: 0; cursor: pointer;
	font: inherit; font-size: 12.5px; font-weight: 600;
	color: var(--fpkd-primary); text-decoration: underline; text-underline-offset: 2px;
}
.fpkd-linkbtn:hover { color: var(--fpkd-accent); }

/* ---- a line inside the drawer ---- */
.fpkd-dline {
	display: grid;
	grid-template-columns: 62px minmax(0, 1fr) 26px;
	gap: 12px;
	align-items: start;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--fpkd-line);
}
.fpkd-dline:last-of-type { border-bottom: 0; padding-bottom: 0; }

.fpkd-dline__thumb {
	width: 62px; height: 62px;
	border-radius: 9px; overflow: hidden;
	background: linear-gradient(135deg, var(--fpkd-primary), var(--fpkd-primary-2));
}
.fpkd-dline__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.fpkd-dline__title {
	margin: 0 0 5px;
	font-size: 13.5px; font-weight: 700; line-height: 1.35;
	color: var(--fpkd-primary);
}
.fpkd-dline__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.fpkd-dline__row {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.fpkd-dline__total { font-size: 13.5px; font-weight: 800; white-space: nowrap; }

.fpkd-dline__remove {
	width: 26px; height: 26px;
	border: 0; border-radius: 7px; background: none;
	font-size: 17px; line-height: 1; color: var(--fpkd-muted);
	cursor: pointer; transition: background .18s ease, color .18s ease;
}
.fpkd-dline__remove:hover { background: #fdecec; color: var(--fpkd-accent); }

.fpkd-stepper--sm .fpkd-stepper__btn { width: 26px; height: 32px; font-size: 14px; }
.fpkd-stepper--sm .fpkd-stepper__input { width: 30px; height: 32px; font-size: 13px; }

.fpkd-empty-state--drawer { padding: 40px 16px; border: 0; background: transparent; }

/* The page behind a modal should not scroll under it. */
body.fpkd-no-scroll { overflow: hidden; }

@media (max-width: 480px) {
	.fpkd-drawer__panel { width: 100%; }
}

/* While an AJAX cart change is in flight. Pointer events are off so a second
   click cannot queue a change against a total that is about to be replaced. */
.fpkd-drawer__panel.is-busy {
	opacity: .55;
	pointer-events: none;
	transition: opacity .15s ease;
}

/* =========================================================
   DRAWER MOTION
   ========================================================= */

/* The lines come in one after another rather than all at once, so the eye has
   something to follow from the top of the list down. --i is the row's index,
   written by PHP, because CSS cannot count. `backwards` holds them hidden
   through the delay. */
.fpkd-drawer.is-open .fpkd-dline {
	animation: fpkd-line-in .42s cubic-bezier(.22, 1, .36, 1) backwards;
	animation-delay: calc(var(--i, 0) * 55ms + 150ms);
}

@keyframes fpkd-line-in {
	from { opacity: 0; transform: translateX(22px); }
	to   { opacity: 1; transform: translateX(0); }
}

/* The row that just changed, so an add into an already-open cart is visible
   rather than a number quietly going up somewhere in a list. */
.fpkd-dline.is-added {
	animation: fpkd-line-flash 1.1s ease-out;
}

@keyframes fpkd-line-flash {
	0%   { background: rgba(80, 21, 91, .16); box-shadow: 0 0 0 10px rgba(80, 21, 91, .10); }
	100% { background: transparent; box-shadow: 0 0 0 10px rgba(80, 21, 91, 0); }
}

/* The header button answers too, so the cart is findable after an add made
   from the bottom of a long page. */
.cart-btn.is-bumped { animation: fpkd-bump .5s cubic-bezier(.22, 1, .36, 1); }

@keyframes fpkd-bump {
	0%   { transform: scale(1); }
	38%  { transform: scale(1.14); }
	100% { transform: scale(1); }
}

.cart-btn.is-bumped .cart-btn__count { animation: fpkd-bump .5s .06s cubic-bezier(.22, 1, .36, 1); }

/* The Add to Cart button confirms the press while the request is in flight. */
.fpkd-btn.is-sending { opacity: .72; pointer-events: none; }

/* Which amount a drawer row is for. Without it two rows of the same appeal at
   different tiers are indistinguishable — same title, same thumbnail. */
.fpkd-dline__unit {
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	color: var(--fpkd-primary);
	line-height: 1.4;
}

.fpkd-dline__tier {
	display: block;
	font-weight: 500;
	color: var(--fpkd-muted);
	font-size: 11.5px;
	line-height: 1.45;
	margin-top: 2px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
