/*
 * Institutional pages (page-content.php): about, donate, claim, privacy,
 * terms, guidelines, contact, list your church.
 *
 * These are reading pages, so the job is a comfortable measure and clear
 * hierarchy rather than decoration. Built from the existing tokens only.
 *
 * @author Jeferson Luiz de Paula
 */

.page-doc {
	max-width: 760px; /* ~70 characters: long enough to read, short enough to finish */
	padding-bottom: 40px;
}

.page-doc .page-head {
	padding: 30px 0 4px;
	border-bottom: 1px solid var(--line);
	margin-bottom: 8px;
}

.page-doc .page-head .h-page {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(30px, 5vw, 44px);
	line-height: 1.08;
	margin: 0 0 10px;
}

.page-doc .lede {
	font-size: clamp(17px, 2.2vw, 20px);
	line-height: 1.5;
	color: var(--muted);
	margin: 0 0 6px;
}

/* ---------------------------------------------------------------- blocks */

.doc-block {
	padding: 26px 0;
	border-bottom: 1px solid var(--line);
}

.doc-block:last-of-type {
	border-bottom: 0;
}

.doc-block > h2 {
	font-family: "Fraunces", Georgia, serif;
	font-size: clamp(21px, 3vw, 26px);
	line-height: 1.2;
	margin: 0 0 12px;
}

.doc-block .prose {
	font-size: 16.5px;
	line-height: 1.7;
}

.doc-block .prose p {
	margin: 0 0 14px;
}

.doc-block .prose p:last-child {
	margin-bottom: 0;
}

.doc-block .prose a {
	color: var(--gold-deep);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.doc-block .cta-gold {
	margin: 0;
}

/* ----------------------------------------------------------------- steps */

.doc-steps {
	counter-reset: step;
	list-style: none;
	margin: 0;
	padding: 0;
}

.doc-steps li {
	counter-increment: step;
	position: relative;
	padding: 0 0 18px 52px;
	line-height: 1.6;
}

.doc-steps li::before {
	content: counter(step);
	position: absolute;
	left: 0;
	top: -2px;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--wash-gold);
	border: 1px solid var(--gold-soft);
	color: var(--gold-deep);
	font-family: "Fraunces", Georgia, serif;
	font-size: 16px;
	font-weight: 700;
}

.doc-steps li:not(:last-child)::after {
	content: "";
	position: absolute;
	left: 17px;
	top: 36px;
	bottom: 6px;
	width: 1px;
	background: var(--line);
}

.doc-steps b {
	display: block;
	font-size: 16.5px;
	margin-bottom: 2px;
}

.doc-steps span {
	color: var(--muted);
	font-size: 15px;
}

/* ------------------------------------------------------------------- faq */

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

.doc-faq details:first-child {
	border-top: 1px solid var(--line);
}

.doc-faq summary {
	cursor: pointer;
	list-style: none;
	padding: 15px 34px 15px 0;
	font-weight: 600;
	font-size: 16.5px;
	position: relative;
}

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

.doc-faq summary::after {
	content: "";
	position: absolute;
	right: 6px;
	top: 50%;
	width: 9px;
	height: 9px;
	margin-top: -6px;
	border-right: 2px solid var(--gold);
	border-bottom: 2px solid var(--gold);
	transform: rotate(45deg);
	transition: transform .2s var(--ease);
}

.doc-faq details[open] summary::after {
	transform: rotate(-135deg);
	margin-top: -2px;
}

.doc-faq details > .prose {
	padding: 0 0 18px;
	color: var(--muted);
}

/* ---------------------------------------------------------------- notice */

.doc-notice {
	background: var(--wash-blue);
	border: 1px solid var(--line);
	border-left: 3px solid var(--gold);
	border-radius: var(--radius-btn);
	padding: 14px 18px;
	margin: 0;
	font-size: 15.5px;
	line-height: 1.6;
}

/* --------------------------------------------------------------- updated */

.doc-updated {
	margin: 26px 0 0;
	padding-top: 18px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 13.5px;
}

/* ------------------------------------------------------------------ claim
 * The claim form (page-claim.php). It sits inside a .doc-block, so it
 * inherits the reading measure and only needs its own field rhythm.
 */

/* The listing being claimed, so nobody claims the wrong St Mary's. */
.claim-target {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 16px;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	background: var(--card);
}

.claim-target b {
	display: block;
	font-size: 16.5px;
}

.claim-target span {
	color: var(--muted);
	font-size: 14px;
}

.claim-target a {
	color: var(--gold-deep);
	font-size: 14px;
	white-space: nowrap;
}

.claim-hint {
	margin: 12px 0 0;
	color: var(--muted);
	font-size: 14.5px;
	line-height: 1.6;
}

/* ------------------------------------------------------------ the fields */

.claim-form {
	margin-top: 20px;
}

.cf-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

@media (max-width: 620px) {
	.cf-row { grid-template-columns: 1fr; }
}

.cf-field {
	margin-bottom: 16px;
}

.cf-field label {
	display: block;
	font-weight: 600;
	font-size: 14.5px;
	margin-bottom: 6px;
}

.cf-field .input {
	width: 100%;
}

.cf-field small {
	display: block;
	margin-top: 5px;
	color: var(--muted);
	font-size: 13px;
}

.cf-opt {
	font-weight: 400;
	color: var(--muted);
	font-size: 13px;
}

.cf-small {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 13px;
	line-height: 1.6;
}

.cf-small a {
	color: var(--gold-deep);
}

.cf-actions {
	margin: 18px 0 0;
}

/* ----------------------------------------------------------- find a church */

.claim-search {
	display: flex;
	gap: 10px;
	margin-bottom: 18px;
}

.claim-search .input {
	flex: 1;
}

@media (max-width: 520px) {
	.claim-search { flex-direction: column; }
}

.claim-results {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--line);
}

.claim-results li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 13px 0;
	border-bottom: 1px solid var(--line);
}

.cr-title {
	display: block;
	font-weight: 600;
	font-size: 16px;
}

.cr-meta {
	display: block;
	color: var(--muted);
	font-size: 13.5px;
	margin-top: 2px;
}

/* The about-you heading inside the create form (page-submit.php). */
.cf-heading {
	margin: 26px 0 4px;
	font-family: "Fraunces", Georgia, serif;
	font-size: 19px;
}

/* -----------------------------------------------------------------------------
 * The contact form (Fluent Forms, /contact/).
 *
 * The plugin ships its own stylesheet and it looks like a plugin. These rules
 * do not fight it: they re-point the handful of things that carry a visual
 * identity - control shape, focus ring, label weight, button colour - at the
 * design tokens, so the form reads as part of the site in both themes. Same
 * rule applied to PMPro's screens and to GiveWP's form.
 * -------------------------------------------------------------------------- */
.doc-block .fluentform { margin-top: 18px; }

.doc-block .ff-el-group { margin-bottom: 18px; }

.doc-block .ff-el-input--label label {
	font-size: 13px;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--muted);
}
.doc-block .ff-el-is-required.asterisk-right label:after { color: var(--gold-deep); }

.doc-block .ff-el-form-control {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--line);
	border-radius: var(--radius-btn);
	background: var(--card);
	color: var(--ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	box-shadow: none;
	transition: border-color .15s;
}
.doc-block .ff-el-form-control:focus {
	border-color: var(--gold);
	outline: 3px solid var(--gold);
	outline-offset: 1px;
	background: var(--card);
}
.doc-block select.ff-el-form-control { appearance: none; padding-right: 34px;
	background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
	                  linear-gradient(135deg, var(--muted) 50%, transparent 50%);
	background-position: calc(100% - 18px) 55%, calc(100% - 12px) 55%;
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}
.doc-block .ff-el-help-message { font-size: 13px; color: var(--muted); margin-top: 5px; }

.doc-block .ff-btn-submit,
.doc-block .ff-btn.ff-btn-submit {
	background: var(--gold) !important;
	color: var(--navy) !important;
	border: none;
	border-radius: var(--radius-btn);
	padding: 13px 26px;
	font-family: inherit;
	font-weight: 800;
	font-size: 15px;
	cursor: pointer;
	transition: box-shadow .15s, transform .15s var(--ease);
}
.doc-block .ff-btn-submit:hover { box-shadow: var(--shadow-soft); }
.doc-block .ff-btn-submit:active { transform: translateY(1px); }

/* Errors and the thank-you note, in the site's own voice rather than the
   plugin's red-on-white default. */
.doc-block .ff-el-is-error .ff-el-form-control { border-color: #C0392B; }
.doc-block .error.text-danger, .doc-block .error-text { font-size: 13px; color: #C0392B; margin-top: 5px; }
.doc-block .ff-message-success {
	border: 1.5px solid var(--gold);
	background: var(--gold-soft);
	color: var(--navy);
	border-radius: var(--radius);
	padding: 18px 20px;
	font-size: 15.5px;
}
[data-theme="dark"] .doc-block .ff-message-success { color: var(--ink); }

/* ------------------------------------------------------------------ donate
 * The GiveWP form arrives as an IFRAME, so everything inside it is styled by
 * Theme\GiveEmbed through give_embed_head - these rules only place the frame
 * on the page.
 *
 * The overlap the owner reported twice (2026-08-27) was NOT missing margin
 * here: give.css ships `.admin-bar .give-embed-form-wrapper{margin-top:-26px}`,
 * so anyone logged in with the admin bar saw the form pulled 26px up over the
 * lede while logged-out visitors never did. Neutralise it and own the gap. */
.donate-form { margin-top: 30px; }
.donate-form .give-embed-form-wrapper,
.admin-bar .donate-form .give-embed-form-wrapper { margin-top: 0 !important; }
.donate-form .give-embed-form-wrapper { max-width: 720px; }
.donate-form iframe { display: block; width: 100%; }
