/* Ranch for a Cause: page-scoped styles. Brand colors only:
   Shack Red #ED1C24, Pure White #FFFFFF, BH Black #490000, Shack Yellow #FFDE40, Pink #F04E59. */

body.rfac-page {
	--rfac-red: #ED1C24;
	--rfac-white: #FFFFFF;
	--rfac-black: #490000;
	--rfac-yellow: #FFDE40;
	--rfac-pink: #F04E59;
	--rfac-body-font: "Bricolage Grotesque", "bricolage-grotesque", sans-serif;
	overflow-x: clip;
	background: var(--rfac-red);
}

html:has(body.rfac-page) {
	scroll-behavior: smooth;
}

body.rfac-page #partners,
body.rfac-page #jingle {
	scroll-margin-top: 1rem;
}

html.rfac-noscroll,
html.rfac-noscroll body {
	overflow: hidden;
}

.rfac-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

body.rfac-page a:focus-visible,
body.rfac-page button:focus-visible,
body.rfac-page select:focus-visible,
body.rfac-page .leaflet-marker-icon:focus-visible {
	outline: 3px solid var(--rfac-yellow);
	outline-offset: 3px;
	box-shadow: 0 0 0 6px var(--rfac-black);
}

/* ------------------------------------------------------------------ map */

.rfac-map-host {
	display: block !important;
	align-self: stretch;
}

.rfac-map {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	min-height: inherit;
	background: var(--rfac-white);
	font-family: var(--rfac-body-font);
}

.rfac-map__bar {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	align-items: center;
	padding: 0.85rem;
	background: var(--rfac-white);
	border-bottom: 3px solid var(--rfac-black);
	position: relative;
	z-index: 500;
}

body.rfac-page .rfac-map .rfac-map__select {
	font-family: var(--rfac-body-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	flex: 1 1 16rem;
	min-width: 0;
	min-height: 48px;
	padding: 0 1rem;
	font: 700 1rem/1 var(--rfac-body-font);
	color: var(--rfac-black) !important;
	background: var(--rfac-white) !important;
	border: 3px solid var(--rfac-black) !important;
	border-radius: 999px;
}

body.rfac-page .rfac-map .rfac-map__btn {
	font-family: var(--rfac-body-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	min-height: 48px;
	padding: 0 1.3rem;
	font: 800 1rem/1 var(--rfac-body-font);
	color: var(--rfac-white) !important;
	background: var(--rfac-red) !important;
	border: 3px solid var(--rfac-black) !important;
	border-radius: 999px;
	box-shadow: 0 4px 0 var(--rfac-black);
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s;
}

body.rfac-page .rfac-map .rfac-map__btn:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--rfac-black); }
body.rfac-page .rfac-map .rfac-map__btn--ghost { color: var(--rfac-black) !important; background: var(--rfac-yellow) !important; }

.rfac-map__canvas {
	flex: 1 1 auto;
	height: 36rem;
	min-height: 420px;
	background: #f3f1ef;
	outline: none;
}

/* Muted base map so the logo pins carry the color, like the reference map. */
body.rfac-page .rfac-map .leaflet-container,
body.rfac-page .rfac-map .leaflet-popup-content,
body.rfac-page .rfac-share,
body.rfac-page .rfac-share p {
	font-family: var(--rfac-body-font) !important;
}

.rfac-map .leaflet-tile-pane {
	filter: grayscale(1) contrast(0.95) brightness(1.04);
}

.rfac-map .leaflet-control-zoom a {
	width: 40px;
	height: 40px;
	line-height: 38px;
	font-size: 1.3rem;
	color: var(--rfac-black);
	border-color: var(--rfac-black);
}

.rfac-map .leaflet-control-attribution {
	font: 400 0.7rem/1.3 var(--rfac-body-font);
}

body.rfac-page .rfac-map .rfac-map__hint {
	font-family: var(--rfac-body-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	position: absolute;
	left: 50%;
	bottom: 1.25rem;
	transform: translateX(-50%);
	z-index: 600;
	padding: 0.85rem 1.4rem;
	font: 800 1rem/1 var(--rfac-body-font);
	color: var(--rfac-white) !important;
	background: var(--rfac-black) !important;
	border: 0 !important;
	border-radius: 999px;
	box-shadow: 0 4px 0 var(--rfac-red);
}

.rfac-map.is-fullscreen {
	position: fixed;
	inset: 0;
	z-index: 99999;
	height: 100dvh;
}

.rfac-map.is-fullscreen .rfac-map__canvas { height: auto; }

/* Pins */
.rfac-pin-wrap { background: none; border: 0; }

.rfac-pin {
	position: relative;
	display: block;
	width: 72px;
	height: 88px;
}

.rfac-pin__badge {
	position: absolute;
	top: 0;
	left: 4px;
	width: 64px;
	height: 64px;
	border-radius: 50%;
	background: var(--rfac-white);
	border: 4px solid var(--rfac-red);
	box-shadow: 0 6px 14px rgba(73, 0, 0, 0.28);
	overflow: hidden;
	z-index: 2;
	transition: transform 0.2s;
}

.rfac-pin__badge img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.rfac-pin__tip {
	position: absolute;
	left: 50%;
	top: 60px;
	width: 0;
	height: 0;
	transform: translateX(-50%);
	border-left: 11px solid transparent;
	border-right: 11px solid transparent;
	border-top: 18px solid var(--rfac-red);
	z-index: 1;
}

.rfac-pin__halo {
	position: absolute;
	left: 50%;
	bottom: -6px;
	width: 70px;
	height: 26px;
	transform: translateX(-50%);
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(237, 28, 36, 0.45), rgba(237, 28, 36, 0));
	z-index: 0;
}

.leaflet-marker-icon:hover .rfac-pin__badge,
.leaflet-marker-icon:focus .rfac-pin__badge { transform: scale(1.12); }

/* Drop-in when the map is revealed, staggered per pin. */
.rfac-map:not(.is-revealed) .rfac-pin { opacity: 0; }

.rfac-map.is-revealed .rfac-pin {
	animation: rfac-drop 0.75s cubic-bezier(0.34, 1.56, 0.64, 1) both;
	animation-delay: calc(var(--i, 0) * 110ms);
}

.rfac-map.is-revealed .rfac-pin__halo {
	animation: rfac-halo 2.4s ease-in-out infinite;
	animation-delay: calc(0.8s + var(--i, 0) * 110ms);
}

@keyframes rfac-drop {
	0% { opacity: 0; transform: translateY(-90px) scale(0.6); }
	60% { opacity: 1; transform: translateY(6px) scale(1.05); }
	100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rfac-halo {
	0%, 100% { opacity: 0.55; transform: translateX(-50%) scale(0.8); }
	50% { opacity: 1; transform: translateX(-50%) scale(1.25); }
}

/* Clusters */
.rfac-cluster { background: none; border: 0; }

.rfac-cluster__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	font: 800 1.5rem/1 var(--rfac-body-font);
	color: var(--rfac-white);
	background: var(--rfac-red);
	border: 4px solid var(--rfac-white);
	box-shadow: 0 0 0 4px var(--rfac-black), 0 0 0 12px rgba(237, 28, 36, 0.25);
}

/* Popups */
.rfac-popup .leaflet-popup-content-wrapper {
	border-radius: 1.1rem;
	border: 4px solid var(--rfac-black);
	box-shadow: 0 0.6rem 0 var(--rfac-red);
	padding: 0;
	overflow: hidden;
}

.rfac-popup .leaflet-popup-content {
	margin: 0;
	width: min(280px, calc(100vw - 72px)) !important;
}

.rfac-popup .leaflet-popup-tip { background: var(--rfac-white); border: 4px solid var(--rfac-black); }

.rfac-popup a.leaflet-popup-close-button {
	width: 32px;
	height: 32px;
	font-size: 22px;
	line-height: 30px;
	color: var(--rfac-black);
	top: 6px;
	right: 6px;
}

.rfac-pop {
	font-family: var(--rfac-body-font);
	color: var(--rfac-black);
	padding: 1.1rem 1.25rem 1.3rem;
}

.rfac-pop__logo img {
	display: block;
	width: 100%;
	max-width: 280px;
	height: auto;
	max-height: 140px;
	object-fit: contain;
	margin: 0 auto 0.6rem;
}

body.rfac-page .rfac-pop .rfac-pop__name {
	font-family: var(--rfac-body-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	margin: 0 0 0.35rem;
	font: 800 1.25rem/1.15 var(--rfac-body-font);
	color: var(--rfac-red) !important;
}

.rfac-pop__addr,
.rfac-pop__shacks {
	margin: 0 0 0.6rem;
	font-size: 0.95rem;
	line-height: 1.45;
	overflow-wrap: anywhere;
}

.rfac-pop__shacks-label { font-weight: 700; }

body.rfac-page .rfac-pop .rfac-pop__cta {
	font-family: var(--rfac-body-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.25rem;
	margin-top: 0.25rem;
	font: 800 1rem/1 var(--rfac-body-font);
	color: var(--rfac-white) !important;
	background: var(--rfac-red) !important;
	border: 3px solid var(--rfac-black) !important;
	border-radius: 999px;
	box-shadow: 0 4px 0 var(--rfac-black);
	text-decoration: none !important;
}

body.rfac-page .rfac-pop .rfac-pop__cta:hover { transform: translateY(2px); box-shadow: 0 2px 0 var(--rfac-black); }

/* ------------------------------------------------------------------ share */

.rfac-share {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	font-family: var(--rfac-body-font);
	color: var(--rfac-white);
}

.rfac-share__ticker {
	position: relative;
	padding: 1.4rem 1.5rem 1.2rem;
	background: var(--rfac-black);
	border: 4px solid var(--rfac-white);
	border-radius: 1.25rem;
	box-shadow: 0.6rem 0.6rem 0 var(--rfac-yellow);
	transform: rotate(1deg);
}

.rfac-share__count,
.rfac-share__dollars {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 0.6rem;
}

.rfac-share__num {
	font: 900 4rem/1 var(--rfac-body-font);
	color: var(--rfac-yellow);
	font-variant-numeric: tabular-nums;
}

.rfac-share__num-label,
.rfac-share__dollar-label {
	font-weight: 700;
	font-size: 1.1rem;
}

.rfac-share__dollar-num {
	font: 900 2.25rem/1 var(--rfac-body-font);
	color: var(--rfac-white);
	font-variant-numeric: tabular-nums;
}

.rfac-share__bar {
	position: relative;
	height: 1rem;
	margin-top: 0.9rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	overflow: hidden;
}

.rfac-share__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: inherit;
	background: var(--rfac-yellow);
	transition: width 1.2s cubic-bezier(0.2, 0.7, 0.3, 1);
}

.rfac-share__fine {
	margin: 0.6rem 0 0;
	font-size: 0.9rem;
	line-height: 1.4;
	opacity: 0.9;
}

.rfac-share__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem;
}

body.rfac-page .rfac-share .rfac-btn {
	font-family: var(--rfac-body-font) !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	text-decoration: none !important;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 1.3rem;
	font: 800 1rem/1 var(--rfac-body-font);
	font-weight: 800 !important;
	font-size: 1rem !important;
	line-height: 1 !important;
	color: var(--rfac-red) !important;
	background: var(--rfac-white) !important;
	border: 3px solid var(--rfac-black) !important;
	border-radius: 999px;
	box-shadow: 0 5px 0 var(--rfac-black);
	text-decoration: none !important;
	cursor: pointer;
	transition: transform 0.15s, box-shadow 0.15s;
}

body.rfac-page .rfac-share .rfac-btn:hover,
body.rfac-page .rfac-share .rfac-btn:focus { transform: translateY(3px); box-shadow: 0 2px 0 var(--rfac-black); }
body.rfac-page .rfac-share .rfac-btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--rfac-black); }

body.rfac-page .rfac-share .rfac-btn--primary {
	flex: 1 1 100%;
	min-height: 60px;
	font-size: 1.25rem !important;
	color: var(--rfac-black) !important;
	background: var(--rfac-yellow) !important;
}

body.rfac-page .rfac-share__actions--even .rfac-btn { flex: 1 1 auto; }

.rfac-share__status {
	min-height: 1.4em;
	margin: 0;
	font-weight: 700;
	color: var(--rfac-yellow);
}

.rfac-bit {
	position: absolute;
	width: 10px;
	height: 14px;
	pointer-events: none;
	z-index: 5;
}

@media (max-width: 767px) {
	.rfac-map__canvas { height: 27rem; }
	/* Compact popup so it fits the phone map without pushing its pin off screen. */
	.rfac-pop { padding: 0.8rem 1rem 1rem; }
	.rfac-pop__logo img { max-height: 84px; margin-bottom: 0.4rem; }
	body.rfac-page .rfac-pop .rfac-pop__name { font-size: 1.1rem; }
	.rfac-pop__addr,
	.rfac-pop__shacks { font-size: 0.875rem; margin-bottom: 0.45rem; }
	body.rfac-page .rfac-map .rfac-map__select { flex-basis: 100%; }
	body.rfac-page .rfac-map .rfac-map__btn { flex: 1 1 0; }
	.rfac-share__num { font-size: 3rem; }
	.rfac-share__dollar-num { font-size: 1.8rem; }
	body.rfac-page .rfac-share .rfac-btn { flex: 1 1 calc(50% - 0.65rem); }
}

@media (prefers-reduced-motion: reduce) {
	html:has(body.rfac-page) { scroll-behavior: auto; }
	.rfac-map .rfac-pin,
	.rfac-map .rfac-pin__halo { animation: none !important; opacity: 1 !important; }
	.rfac-share__fill,
	.rfac-btn,
	.rfac-map__btn { transition: none; }
}
