/* Grace Tributes — every rule is scoped under .gft so nothing leaks into the rest of the site,
   and properties are set explicitly so the theme's own button/link/input styles don't leak in. */

.gft {
	--gft-plum: #7B1F45;
	--gft-plum-deep: #5A1535;
	--gft-ink: #3F1529;
	--gft-ground: #FBF6F8;
	--gft-panel: #E3CAD3;
	--gft-photo: #EBD6DF;
	--gft-border: #DCC3CE;
	--gft-input: #C9A9B7;
	--gft-muted: #6A4454;
	--gft-body: #5C3A49;
	--gft-sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--gft-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;

	box-sizing: border-box;
	font-family: var(--gft-sans);
	font-weight: 300;
	color: var(--gft-ink);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.gft *, .gft *::before, .gft *::after { box-sizing: border-box; }
.gft p { margin: 0; }
.gft a { color: var(--gft-plum); }
.gft a:hover, .gft a:focus { color: var(--gft-plum-deep); }
.gft :focus-visible { outline: 2px solid var(--gft-plum); outline-offset: 2px; }
.gft [hidden] { display: none !important; }

/* ---------- Shared pieces ---------- */

.gft .gft-label,
.gft .gft-label-h,
.gft-filters label {
	display: block;
	margin: 0;
	font-family: var(--gft-sans);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gft-muted);
}
.gft .gft-label-h { font-size: 13px; font-weight: 500; letter-spacing: 0.1em; }

:is(.gft, #gft-boost) .gft-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	padding: 11px 22px;
	margin: 0;
	font-family: var(--gft-sans);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	color: #FFFFFF;
	background: var(--gft-plum);
	border: 1px solid var(--gft-plum);
	border-radius: 6px;
	box-shadow: none;
	cursor: pointer;
}
:is(.gft, #gft-boost) .gft-btn:hover, :is(.gft, #gft-boost) .gft-btn:focus { color: #FFFFFF; background: var(--gft-plum-deep); border-color: var(--gft-plum-deep); }
:is(.gft, #gft-boost) .gft-btn--quiet { color: var(--gft-plum); background: #FFFFFF; border-color: var(--gft-input); }
:is(.gft, #gft-boost) .gft-btn--quiet:hover, :is(.gft, #gft-boost) .gft-btn--quiet:focus { color: var(--gft-plum-deep); background: var(--gft-ground); border-color: var(--gft-plum); }

.gft .gft-badge {
	display: inline-block;
	align-self: flex-start;
	margin: 0 0 9px;
	padding: 3px 10px;
	border-radius: 11px;
	background: var(--gft-plum);
	color: #FFFFFF;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}
.gft .gft-badge--draft { background: #FFFFFF; color: var(--gft-muted); border: 1px dashed var(--gft-muted); }

.gft .gft-photo { display: block; width: 100%; height: 100%; margin: 0; border: 0; border-radius: 0; }
/* Whole photo, never cropped; a blurred copy fills any spare space. */
.gft .gft-photo--framed { position: relative; overflow: hidden; background: var(--gft-photo); }
.gft .gft-photo__blur {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	filter: blur(18px) saturate(0.8) brightness(0.95);
	transform: scale(1.45);
}
.gft .gft-photo__blur::after { content: ''; position: absolute; inset: 0; background: rgba(251, 246, 248, 0.25); }
.gft .gft-photo__img {
	position: relative;
	display: block;
	/* !important: themes often write their own sizes straight onto images, which would undo this. */
	width: 100% !important;
	height: 100% !important;
	max-width: none !important;
	max-height: none !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	object-fit: contain !important;
	object-position: center !important;
}
.gft .gft-photo--none {
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--gft-photo);
	font-family: var(--gft-serif);
	font-size: 46px;
	font-weight: 300;
	color: #8A5A6F;
	letter-spacing: 0.02em;
}

/* ---------- Listing ---------- */

.gft-listing { max-width: 1180px; margin: 0 auto; padding: 0 0 56px; }
.gft .gft-listing__title {
	margin: 0 0 14px;
	font-family: var(--gft-serif);
	font-size: clamp(38px, 6vw, 52px);
	font-weight: 300;
	line-height: 1.05;
	color: var(--gft-plum-deep);
}
.gft .gft-intro { padding: 0 0 30px; border-bottom: 2px solid var(--gft-plum); }
.gft .gft-intro p { max-width: 620px; font-size: 17px; line-height: 1.55; color: var(--gft-body); }
.gft .gft-intro p + p { margin-top: 0.8em; }

.gft .gft-bar { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 20px; margin: 26px 0 0; }

.gft .gft-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.gft .gft-tab {
	display: inline-block;
	padding: 11px 20px;
	font-size: 15px;
	font-weight: 300;
	text-decoration: none;
	color: var(--gft-muted);
	background: #F2E3EA;
	border: 1px solid var(--gft-input);
	border-radius: 6px 6px 0 0;
}
.gft .gft-tab:hover { color: var(--gft-plum-deep); background: #FFFFFF; }
.gft .gft-tab.is-on { color: var(--gft-plum-deep); font-weight: 500; background: #FFFFFF; border-bottom: 3px solid var(--gft-plum); }

.gft .gft-filters { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 0; }
.gft .gft-field { display: block; }
.gft-filters label { margin-bottom: 5px; }
:is(.gft, #gft-boost) .gft-filters input[type="search"],
:is(.gft, #gft-boost) .gft-filters select {
	display: block;
	width: 232px;
	max-width: 100%;
	min-height: 46px;
	margin: 0;
	padding: 10px 12px;
	font-family: var(--gft-sans);
	font-size: 15px;
	font-weight: 300;
	color: var(--gft-ink);
	background-color: #FFFFFF;
	border: 1px solid var(--gft-input);
	border-radius: 6px;
	box-shadow: none;
}
:is(.gft, #gft-boost) .gft-filters select { width: auto; padding-right: 36px; }

.gft .gft-count { margin: 22px 0 0; font-size: 14px; color: var(--gft-muted); }

.gft .gft-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(252px, 1fr));
	gap: 26px;
	margin: 18px 0 0;
	padding: 0;
	list-style: none;
}
.gft .gft-grid__item { margin: 0; padding: 0; list-style: none; }
.gft .gft-grid__item::before, .gft .gft-grid__item::marker { content: none; }

.gft .gft-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: #FFFFFF;
	border: 1px solid var(--gft-border);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s ease;
}
.gft .gft-card:hover, .gft .gft-card:focus { border-color: var(--gft-plum); color: inherit; }
.gft .gft-card__photo { display: block; aspect-ratio: 1 / 1; background: var(--gft-photo); overflow: hidden; }
.gft .gft-card__body { display: flex; flex-direction: column; align-items: center; flex: 1; padding: 17px 18px 19px; text-align: center; }
.gft .gft-card__body .gft-badge { align-self: center; }
.gft .gft-card__name { display: block; font-family: var(--gft-serif); font-size: 25px; font-weight: 400; line-height: 1.15; color: var(--gft-ink); }
.gft .gft-card__known { display: block; font-family: var(--gft-serif); font-size: 25px; font-weight: 400; line-height: 1.15; color: var(--gft-ink); }
.gft .gft-card__years { display: block; margin-top: 4px; font-size: 14px; color: var(--gft-muted); letter-spacing: 0.03em; }
.gft .gft-card__service { display: block; align-self: stretch; margin-top: auto; padding-top: 12px; }
.gft .gft-card__service::before { content: ''; display: block; margin: 0 0 12px; border-top: 1px solid var(--gft-photo); }
.gft .gft-card__when { display: block; font-size: 14px; line-height: 1.45; color: var(--gft-body); }
.gft .gft-card__place { display: block; margin-top: 2px; font-size: 14px; color: var(--gft-muted); }

.gft .gft-empty {
	margin: 30px 0;
	padding: 30px;
	background: #FFFFFF;
	border: 1px solid var(--gft-border);
	border-radius: 10px;
	font-size: 16px;
	color: var(--gft-body);
}

.gft .gft-pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 34px 0 0; }
.gft .gft-pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	font-size: 15px;
	text-decoration: none;
	border: 1px solid var(--gft-border);
	border-radius: 6px;
	background: #FFFFFF;
}
.gft .gft-pages .page-numbers.current { background: var(--gft-plum); border-color: var(--gft-plum); color: #FFFFFF; }
.gft .gft-pages .page-numbers.dots { border-color: transparent; background: none; }

/* ---------- One tribute ---------- */

.gft-wrap { padding: 0 20px; }
.gft-detail { max-width: 860px; margin: 0 auto; padding: 0 0 64px; }
.gft .gft-back { margin: 22px 0 0; font-size: 15px; }
.gft .gft-back a { text-decoration: none; }

.gft .gft-sheet { margin: 16px 0 0; background: #FFFFFF; border: 1px solid var(--gft-border); border-radius: 12px; overflow: hidden; }
.gft .gft-sheet__banner { height: 128px; background: var(--gft-panel); }
.gft .gft-sheet__head { padding: 0 24px 34px; text-align: center; }
.gft .gft-sheet__photo {
	display: block;
	width: 168px;
	height: 196px;
	margin: -84px auto 0;
	background: var(--gft-photo);
	border: 6px solid #FFFFFF;
	border-radius: 8px;
	overflow: hidden;
}
.gft .gft-sheet__photo .gft-photo--none { font-size: 50px; }
.gft .gft-sheet__name {
	margin: 18px 0 0;
	padding: 0;
	font-family: var(--gft-serif);
	font-size: clamp(32px, 5vw, 44px);
	font-weight: 300;
	line-height: 1.1;
	letter-spacing: normal;
	text-transform: none;
	color: var(--gft-plum-deep);
}
.gft .gft-sheet__known {
	margin: 0;
	font-family: var(--gft-serif);
	font-size: clamp(32px, 5vw, 44px);
	font-weight: 300;
	line-height: 1.1;
	color: var(--gft-plum-deep);
}
.gft .gft-sheet__years { margin-top: 6px; font-size: 18px; letter-spacing: 0.04em; color: var(--gft-muted); }

.gft .gft-ttabs { display: flex; flex-wrap: wrap; gap: 2px; padding: 0 24px; border-bottom: 1px solid var(--gft-border); }
:is(.gft, #gft-boost) .gft-ttabs [role="tab"] {
	min-height: 48px;
	margin: 0;
	padding: 14px 22px;
	font-family: var(--gft-sans);
	font-size: 15px;
	font-weight: 300;
	letter-spacing: normal;
	text-transform: none;
	color: var(--gft-muted);
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	border-radius: 0;
	box-shadow: none;
	cursor: pointer;
}
:is(.gft, #gft-boost) .gft-ttabs [role="tab"]:hover,
:is(.gft, #gft-boost) .gft-ttabs [role="tab"]:focus,
:is(.gft, #gft-boost) .gft-ttabs [role="tab"]:active { color: var(--gft-plum-deep); background: none; box-shadow: none; }
:is(.gft, #gft-boost) .gft-ttabs [role="tab"][aria-selected="true"] { color: var(--gft-plum-deep); font-weight: 500; border-bottom-color: var(--gft-plum); }

.gft .gft-panel { padding: 32px 36px 36px; }
.gft .gft-panel + .gft-panel { border-top: 1px solid var(--gft-border); } /* only seen without JS */
.gft .gft-panel h2, .gft .gft-panel h3 { margin: 0; padding: 0; }
.gft .gft-text { margin-top: 12px; font-size: 16px; line-height: 1.6; color: var(--gft-ink); }

.gft .gft-facts { display: flex; flex-wrap: wrap; gap: 26px 56px; margin: 18px 0 0; }
.gft .gft-fact { flex: 1 1 220px; }
.gft .gft-fact__main { margin-top: 5px; font-size: 20px; font-weight: 400; line-height: 1.35; color: var(--gft-ink); }
.gft .gft-fact__sub { margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--gft-body); }

.gft .gft-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0 0; }

.gft .gft-map { margin: 26px 0 0; height: 280px; border: 1px solid var(--gft-border); border-radius: 8px; overflow: hidden; background: #E8EDE6; }
.gft .gft-map iframe { display: block; width: 100%; height: 100%; border: 0; }

.gft .gft-panel > .gft-notice:first-child { margin-top: 0; }
.gft .gft-notice { margin: 30px 0 0; padding: 22px 24px; background: var(--gft-ground); border: 1px solid var(--gft-photo); border-radius: 8px; }
.gft .gft-notice p { margin-top: 10px; font-size: 16px; line-height: 1.6; color: var(--gft-ink); }

.gft .gft-player { margin: 20px 0 0; border-radius: 8px; overflow: hidden; background: var(--gft-ink); }
.gft .gft-player iframe { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; }

.gft .gft-oos { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px 32px; margin: 18px 0 0; }
.gft .gft-oos__cover {
	display: block;
	flex: 0 0 210px;
	max-width: 100%;
	aspect-ratio: 210 / 297;
	overflow: hidden;
	background: #FFFFFF;
	border: 1px solid var(--gft-border);
	border-radius: 4px;
	box-shadow: 0 6px 18px rgba(63, 21, 41, 0.12);
	text-decoration: none;
	color: inherit;
}
.gft .gft-oos__cover:hover, .gft .gft-oos__cover:focus { border-color: var(--gft-plum); color: inherit; }
.gft .gft-oos__img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; object-fit: cover; object-position: top; margin: 0; border: 0; }
.gft .gft-oos__img--spread { object-position: right center; }
.gft .gft-oos__plain {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
	height: 100%; padding: 18px 14px; text-align: center;
	background: var(--gft-ground); outline: 1px solid var(--gft-photo); outline-offset: -8px;
}
.gft .gft-oos__plain-k { font-size: 10px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gft-muted); }
.gft .gft-oos__plain-n { font-family: var(--gft-serif); font-size: 21px; line-height: 1.15; color: var(--gft-plum-deep); }
.gft .gft-oos__plain-y { font-size: 12px; letter-spacing: 0.04em; color: var(--gft-muted); }
.gft .gft-oos__side { flex: 1 1 260px; min-width: 0; }
.gft .gft-oos__side .gft-text { margin-top: 0; }
.gft .gft-oos__meta { margin-top: 12px; font-size: 13px; color: var(--gft-muted); }

/* ---------- Phone width ---------- */

@media (max-width: 600px) {
	.gft .gft-bar { align-items: stretch; }
	.gft .gft-tabs { width: 100%; }
	.gft .gft-tab { flex: 1 1 0; text-align: center; padding: 11px 10px; }
	.gft .gft-filters { width: 100%; }
	.gft .gft-filters .gft-field { flex: 1 1 100%; }
	:is(.gft, #gft-boost) .gft-filters input[type="search"], :is(.gft, #gft-boost) .gft-filters select { width: 100%; }
	:is(.gft, #gft-boost) .gft-filters .gft-btn { flex: 1 1 100%; }
	.gft .gft-grid { grid-template-columns: 1fr; gap: 18px; }
	.gft .gft-card { flex-direction: row; }
	.gft .gft-card__photo { flex: 0 0 112px; aspect-ratio: auto; min-height: 140px; }
	.gft .gft-photo--none { font-size: 32px; }
	.gft .gft-card__body { padding: 14px 16px; }
	.gft .gft-card__name, .gft .gft-card__known { font-size: 22px; }

	.gft-wrap { padding: 0 12px; }
	.gft .gft-sheet__banner { height: 96px; }
	.gft .gft-sheet__photo { width: 140px; height: 164px; margin-top: -70px; }
	.gft .gft-ttabs { padding: 0 8px; }
	.gft .gft-ttabs { flex-wrap: wrap; gap: 0; }
	:is(.gft, #gft-boost) .gft-ttabs [role="tab"] { flex: 1 1 auto; padding: 13px 10px; white-space: nowrap; }
	.gft .gft-oos__cover { flex-basis: 140px; margin: 0 auto; }
	.gft .gft-panel { padding: 26px 20px 28px; }
	:is(.gft, #gft-boost) .gft-actions .gft-btn { flex: 1 1 100%; }
	.gft .gft-map { height: 220px; }
}

/* 1.3.0 – notice built inside the theme's own page layout (Sage themes) */
body.gft-in-theme-page .main > .page-header { display: none !important; }
body.gft-in-theme-page .gft-wrap { padding-top: 0; }

/* ---------- 1.4.0 Messages for the family ---------- */

.gft .gft-msgs { margin: 16px 0 0; padding: 28px clamp(18px, 4vw, 36px) 32px; background: #FFFFFF; border: 1px solid var(--gft-border); border-radius: 12px; }
.gft .gft-msgs__say { margin: 14px 0 0; padding: 12px 16px; border-radius: 8px; background: var(--gft-ground); border-left: 3px solid var(--gft-plum); color: var(--gft-ink); }
.gft .gft-msgs__say--bad { border-left-color: #A3352B; }
.gft .gft-msgs__empty { margin: 14px 0 0; color: var(--gft-muted); }

.gft .gft-msgform { margin: 18px 0 0; }
.gft .gft-msgform > summary { list-style: none; width: auto; }
.gft .gft-msgform > summary::-webkit-details-marker { display: none; }
.gft .gft-msgform[open] > summary { display: none !important; }
.gft .gft-msgform__form { margin: 0; padding: 20px; background: var(--gft-ground); border-radius: 10px; }
.gft .gft-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.gft .gft-mfield { margin: 0 0 16px; min-width: 0; border: 0; padding: 0; }
.gft .gft-mrow { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.gft .gft-mfield > label, .gft .gft-share legend { display: block; margin: 0 0 6px; padding: 0; font-family: var(--gft-sans); font-size: 14px; font-weight: 500; color: var(--gft-ink); letter-spacing: normal; text-transform: none; }
.gft .gft-opt { font-weight: 300; color: var(--gft-muted); }
:is(.gft, #gft-boost) .gft-mfield input[type="text"],
:is(.gft, #gft-boost) .gft-mfield input[type="email"],
:is(.gft, #gft-boost) .gft-mfield textarea {
	display: block; width: 100% !important; max-width: none; box-sizing: border-box; margin: 0;
	padding: 11px 14px; font-family: var(--gft-sans); font-size: 16px; font-weight: 300; line-height: 1.5;
	color: var(--gft-ink); background: #FFFFFF; border: 1px solid var(--gft-input); border-radius: 6px; box-shadow: none;
}
:is(.gft, #gft-boost) .gft-mfield textarea { min-height: 130px; resize: vertical; }
:is(.gft, #gft-boost) .gft-mfield input:focus, :is(.gft, #gft-boost) .gft-mfield textarea:focus { border-color: var(--gft-plum); outline: 2px solid rgba(123, 31, 69, 0.18); outline-offset: 0; }
.gft .gft-share label { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; font-size: 15px; font-weight: 300; color: var(--gft-ink); cursor: pointer; }
.gft .gft-share input { margin: 0; accent-color: var(--gft-plum); width: 18px; height: 18px; }
.gft .gft-msgform .gft-actions { margin: 4px 0 0; }

.gft .gft-msglist { list-style: none; margin: 22px 0 0; padding: 0; }
.gft .gft-msg { margin: 0; padding: 20px 0; border-top: 1px solid var(--gft-border); }
.gft .gft-msg:first-child { border-top: 0; padding-top: 4px; }
.gft .gft-msg__text p { margin: 0 0 8px; font-family: var(--gft-serif); font-size: 21px; line-height: 1.5; color: var(--gft-ink); }
.gft .gft-msg__by { margin: 6px 0 0; font-size: 14px; color: var(--gft-muted); display: flex; flex-wrap: wrap; gap: 4px 0; }
.gft .gft-msg__name { font-weight: 500; color: var(--gft-ink); }
.gft .gft-msg__rel { margin-left: 0.3em; }
.gft .gft-msg__date { flex-basis: 100%; font-size: 13px; }

@media (max-width: 600px) {
	.gft .gft-mrow { grid-template-columns: 1fr; }
	.gft .gft-msgform__form { padding: 16px; }
}

/* 1.8.0 – photostory / order of service held back until after the funeral */
.gft .gft-later { margin: 10px 0 0; color: var(--gft-muted); }
.gft .gft-later--staff { margin: 10px 0 14px; padding: 10px 14px; border-radius: 8px; background: #FBEBD9; color: #7A4210; font-size: 14px; }
