/* PHWO Engage — Zakat calculator, newsletter, FAQ, complaints, sticky bar. */

.phwo-zakat,
.phwo-newsletter,
.phwo-faq,
.phwo-complaints {
	--phwo-primary: var(--phwo-color-primary, #0D5C63);
	--phwo-accent: var(--phwo-color-accent, #E8A33D);
	--phwo-support: var(--phwo-color-support, #2A9D8F);
	--phwo-ink: var(--phwo-color-ink, #14262B);
	--phwo-mist: var(--phwo-color-mist, #F5F8F8);
	--phwo-line: #dde5e6;
	--phwo-muted: #6b7a80;
}

/* ==========================================================================
   Zakat calculator
   ========================================================================== */

.phwo-zakat-intro p {
	color: var(--phwo-muted);
}

.phwo-zakat-rates {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 1px;
	background: var(--phwo-line);
	border: 1px solid var(--phwo-line);
	border-radius: 10px;
	overflow: hidden;
	margin: 24px 0 28px;
}

.phwo-zakat-rates > div {
	background: var(--phwo-mist);
	padding: 14px 16px;
}

.phwo-zakat-rates span {
	display: block;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--phwo-muted);
	margin-bottom: 4px;
}

.phwo-zakat-rates strong {
	font-size: 15.5px;
	font-variant-numeric: tabular-nums;
}

.phwo-zakat-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 0;
	border-bottom: 1px solid var(--phwo-line);
	flex-wrap: wrap;
}

.phwo-zakat-row:last-child {
	border-bottom: 0;
}

.phwo-zakat-label {
	flex: 1 1 300px;
	font-weight: 600;
	font-size: 15.5px;
}

.phwo-zakat-label small {
	display: block;
	font-weight: 400;
	font-size: 13px;
	color: var(--phwo-muted);
	margin-top: 2px;
}

.phwo-zakat-input {
	display: flex;
	align-items: stretch;
	border: 1px solid var(--phwo-line);
	border-radius: 8px;
	overflow: hidden;
	flex: 0 0 190px;
	background: #fff;
}

.phwo-zakat-input em {
	display: flex;
	align-items: center;
	padding: 0 12px;
	background: var(--phwo-mist);
	border-right: 1px solid var(--phwo-line);
	font-style: normal;
	font-weight: 700;
	font-size: 14px;
	color: #46565c;
}

.phwo-zakat-input input {
	border: 0;
	width: 100%;
	padding: 12px 14px;
	font-size: 16px;
	font-family: inherit;
	font-weight: 600;
	text-align: right;
	background: #fff;
	color: var(--phwo-ink);
	font-variant-numeric: tabular-nums;
}

.phwo-zakat-input input:focus {
	outline: 3px solid rgba(13, 92, 99, .18);
}

.phwo-zakat-result {
	background: var(--phwo-mist);
	border-radius: 12px;
	padding: 26px 28px;
	margin-top: 8px;
}

.phwo-zakat-result-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 18px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--phwo-line);
}

.phwo-zakat-result-grid span {
	display: block;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--phwo-muted);
	margin-bottom: 4px;
}

.phwo-zakat-result-grid strong {
	font-size: 19px;
	font-variant-numeric: tabular-nums;
}

.phwo-zakat-total {
	padding: 22px 0 4px;
}

.phwo-zakat-total span {
	display: block;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--phwo-muted);
	margin-bottom: 6px;
}

.phwo-zakat-total strong {
	display: block;
	font-size: 38px;
	line-height: 1.1;
	color: var(--phwo-primary);
	font-variant-numeric: tabular-nums;
}

.phwo-zakat-total p {
	margin: 12px 0 0;
	font-size: 14.5px;
	color: var(--phwo-muted);
	max-width: 52ch;
}

.phwo-zakat.is-due .phwo-zakat-total strong {
	color: var(--phwo-primary);
}

.phwo-zakat-donate {
	margin-top: 18px;
	display: none;
}

.phwo-zakat.is-due .phwo-zakat-donate {
	display: inline-block;
}

.phwo-zakat-notes {
	margin-top: 34px;
	padding-top: 26px;
	border-top: 1px solid var(--phwo-line);
}

.phwo-zakat-notes h2 {
	font-size: 19px;
}

.phwo-zakat-notes ul {
	padding-left: 20px;
	color: var(--phwo-muted);
	font-size: 15px;
}

.phwo-zakat-notes li {
	margin-bottom: 10px;
}

/* ==========================================================================
   Newsletter
   ========================================================================== */

.phwo-newsletter {
	background: var(--phwo-primary);
	color: #fff;
	border-radius: 14px;
	padding: 34px 36px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 30px;
	align-items: center;
	margin: 40px 0;
}

.phwo-newsletter.is-compact {
	grid-template-columns: 1fr;
	padding: 26px 28px;
	gap: 18px;
}

.phwo-newsletter h2 {
	color: #fff;
	margin: 0 0 8px;
	font-size: 24px;
}

.phwo-newsletter p {
	margin: 0;
	color: rgba(255, 255, 255, .88);
	font-size: 15px;
}

.phwo-newsletter-fields {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.phwo-newsletter input[type="text"],
.phwo-newsletter input[type="email"] {
	flex: 1 1 180px;
	padding: 13px 15px;
	border: 0;
	border-radius: 8px;
	font-size: 15.5px;
	font-family: inherit;
	color: var(--phwo-ink);
	background: #fff;
	min-width: 0;
}

.phwo-newsletter input:focus {
	outline: 3px solid var(--phwo-accent);
}

.phwo-newsletter button {
	flex: 0 0 auto;
	padding: 13px 26px;
	border: 0;
	border-radius: 8px;
	background: var(--phwo-accent);
	color: var(--phwo-ink);
	font-weight: 700;
	font-size: 15.5px;
	font-family: inherit;
	cursor: pointer;
	transition: filter .15s;
}

.phwo-newsletter button:hover {
	filter: brightness(1.07);
}

.phwo-newsletter-privacy {
	margin-top: 10px !important;
	font-size: 13px !important;
	color: rgba(255, 255, 255, .7) !important;
}

.phwo-newsletter-msg {
	background: rgba(255, 255, 255, .14);
	border-radius: 8px;
	padding: 11px 15px;
	margin-bottom: 14px !important;
	font-size: 14.5px !important;
	color: #fff !important;
}

.phwo-newsletter-msg.is-error {
	background: rgba(255, 210, 205, .2);
}

.phwo-newsletter .phwo-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* ==========================================================================
   FAQ
   ========================================================================== */

.phwo-faq-group {
	margin-bottom: 38px;
}

.phwo-faq-group h2 {
	font-size: 21px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--phwo-primary);
	margin-bottom: 6px;
}

.phwo-faq-item {
	border-bottom: 1px solid var(--phwo-line);
}

.phwo-faq-item summary {
	cursor: pointer;
	padding: 16px 40px 16px 0;
	font-weight: 600;
	font-size: 16.5px;
	list-style: none;
	position: relative;
}

.phwo-faq-item summary::-webkit-details-marker {
	display: none;
}

.phwo-faq-item summary::after {
	content: "+";
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 24px;
	line-height: 1;
	color: var(--phwo-primary);
	font-weight: 400;
}

.phwo-faq-item[open] summary::after {
	content: "\2212";
}

.phwo-faq-item summary:hover {
	color: var(--phwo-primary);
}

.phwo-faq-answer {
	padding: 0 40px 20px 0;
	color: var(--phwo-muted);
}

.phwo-faq-answer p:last-child {
	margin-bottom: 0;
}

/* ==========================================================================
   Complaints
   ========================================================================== */

.phwo-complaints-promise {
	background: var(--phwo-mist);
	border-radius: 12px;
	padding: 26px 28px;
	margin-bottom: 30px;
}

.phwo-complaints-promise h2 {
	margin-top: 0;
	font-size: 20px;
}

.phwo-complaints-promise ol {
	padding-left: 20px;
	margin: 0;
	color: #3d4d53;
}

.phwo-complaints-promise li {
	margin-bottom: 9px;
}

.phwo-complaints-urgent {
	margin: 18px 0 0;
	padding: 13px 16px;
	background: #fdecea;
	border-left: 4px solid #c0392b;
	border-radius: 8px;
	font-size: 14.5px;
	color: #7c2018;
}

.phwo-anon-toggle {
	background: var(--phwo-mist);
	border-radius: 8px;
	padding: 13px 16px !important;
	margin-bottom: 14px !important;
	font-weight: 600;
}

.phwo-anon-warning[hidden] {
	display: none;
}

/* ==========================================================================
   Sticky mobile action bar
   ========================================================================== */

.phwo-stickybar {
	display: none;
}

@media (max-width: 780px) {

	.phwo-stickybar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 95;
		display: flex;
		gap: 8px;
		/* max() rather than calc(): minifiers strip the whitespace CSS
		   requires around + inside calc(), which drops the declaration. */
		padding: 10px 12px;
		padding-bottom: max(10px, env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .97);
		border-top: 1px solid var(--phwo-color-line, #dde5e6);
		box-shadow: 0 -4px 20px rgba(20, 38, 43, .1);
		transform: translateY(110%);
		transition: transform .22s ease;
	}

	.phwo-stickybar.is-visible {
		transform: none;
	}

	.phwo-stickybar a {
		flex: 1;
		text-align: center;
		padding: 13px 10px;
		border-radius: 9px;
		font-weight: 700;
		font-size: 15px;
		text-decoration: none;
		line-height: 1.2;
	}

	.phwo-stickybar-donate {
		background: var(--phwo-color-accent, #E8A33D);
		color: var(--phwo-color-ink, #14262B);
	}

	.phwo-stickybar-second {
		background: var(--phwo-color-primary, #0D5C63);
		color: #fff;
	}

	/* Keep the footer clear of the bar. */
	body.has-stickybar .phwo-footer {
		padding-bottom: 90px;
	}
}

@media (prefers-reduced-motion: reduce) {

	.phwo-stickybar {
		transition: none;
	}
}

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 640px) {

	.phwo-newsletter {
		grid-template-columns: 1fr;
		padding: 26px 22px;
	}

	.phwo-zakat-row {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	.phwo-zakat-input {
		flex: 1 1 auto;
	}

	.phwo-zakat-total strong {
		font-size: 31px;
	}

	.phwo-zakat-result {
		padding: 22px 20px;
	}
}
