/**
 * Atlas Arcadia — the Submit Location receipt page.
 *
 * Plan: docs/plans/2026-09-18-001-feat-submit-location-success-page-plan.md (U4, U6)
 * Design: Claude Design "Submit Location.dc.html", options 3a (desktop) and 3b (390px).
 *
 * TOKENS. The site declares its palette on :root (--aa-orange and friends, from
 * aa-points.php). This file maps it to feature-local names with literal
 * fallbacks, as aa-location-page-assets/page.css does, so the page follows the
 * palette and still draws without it.
 *
 * BACKGROUND AND FOREGROUND ARE SET TOGETHER, on the root and on every card. The7
 * regenerates custom.css to a dark #252525 body whenever caches are cleared.
 *
 * ONE DOM ORDER, TWO LAYOUTS (plan KTD6). Every block is a direct child of
 * .aa-sr__body and grid placement alone decides where it sits. On a phone the pin
 * moves inside the summary card by sitting between its head and its rows over a
 * shared card background — the map node itself never moves, is never duplicated,
 * and never loses its box (display:contents did exactly that to the console map;
 * see aa-submit-location-ux.php).
 *
 * BREAKPOINT. 1024px, matching the rest of the site: Elementor's "tablet 1024px"
 * resolves to max-width: 1023px, so 1024 is desktop and 1023 is the column.
 */

.aa-sr {
	--sr-orange: var( --aa-orange, #db680b );
	--sr-brown: var( --aa-brown, #6a3306 );
	--sr-brown-dark: #4a2404;
	--sr-yellow: var( --aa-yellow, #fae905 );
	--sr-yellow-light: #fdf28a;
	--sr-cream: var( --aa-cream, #fdf6e8 );
	--sr-green: var( --aa-green-count, #2e8b3a );
	--sr-white: #fff;
	--sr-muted: var( --aa-muted, #7d6f5a );
	--sr-rule: #e8ddc4;
	--sr-shadow: 0 2px 8px rgba( 74, 36, 4, .10 );
	--sr-radius: 8px;
	--sr-side: 336px;
	--sr-pad: 26px;
	--sr-display: var( --aa-display, 'Cartridge', ui-sans-serif, system-ui, sans-serif );
	--sr-text: var( --aa-text, 'Poppins', ui-sans-serif, system-ui, sans-serif );

	box-sizing: border-box;
	width: 100%;
	max-width: 1100px;
	margin: 0 auto 56px;
	background: var( --sr-cream );
	color: var( --sr-brown );
	font-family: var( --sr-text );
	font-size: 16px;
	line-height: 1.55;
	letter-spacing: normal;
	overflow-wrap: anywhere;
}

.aa-sr *,
.aa-sr *::before,
.aa-sr *::after {
	box-sizing: border-box;
}

.aa-sr p,
.aa-sr h1,
.aa-sr h2,
.aa-sr dl,
.aa-sr dd,
.aa-sr ol {
	margin: 0;
	padding: 0;
}

.aa-sr a:not( .aa-points__cta ) {
	color: var( --sr-orange );
	text-decoration: none;
}

.aa-sr a:not( .aa-points__cta ):hover {
	color: var( --sr-brown );
}

.aa-sr a:focus-visible {
	outline: 3px solid var( --sr-brown );
	outline-offset: 2px;
}

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

/* --- administrator banner (R7) ----------------------------------------- */

.aa-sr__admin {
	position: sticky;
	top: 0;
	z-index: 5;
	padding: 10px var( --sr-pad );
	background: var( --sr-yellow );
	color: var( --sr-brown );
	font-weight: 700;
	font-size: 14px;
}

/* --- hero -------------------------------------------------------------- */

.aa-sr__hero {
	position: relative;
	overflow: hidden;
	padding: 34px 30px 30px;
	background: var( --sr-brown );
	color: var( --sr-white );
}

/* The design's diagonal band, drawn behind the text. */
.aa-sr__hero::before {
	content: '';
	position: absolute;
	inset: 0;
	background: repeating-linear-gradient( 115deg, rgba( 250, 233, 5, .16 ) 0 16px, rgba( 219, 104, 11, .18 ) 16px 32px, transparent 32px 96px );
	pointer-events: none;
}

.aa-sr__hero-inner {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 18px;
}

.aa-sr__mark {
	flex: none;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 9999px;
	background: var( --sr-green );
	color: var( --sr-white );
	font-size: 26px;
	line-height: 1;
	box-shadow: 0 0 0 5px rgba( 255, 255, 255, .2 );
}

.aa-sr__hero--declined .aa-sr__mark,
.aa-sr__hero--removed .aa-sr__mark {
	background: var( --sr-muted );
}

.aa-sr__hero-text {
	flex: 1;
	min-width: 0;
	max-width: 760px;
}

.aa-sr .aa-sr__heading {
	margin: 0 0 7px;
	font-family: var( --sr-display );
	font-size: 36px;
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: .5px;
	color: var( --sr-yellow );
}

.aa-sr__lede {
	font-size: 14.5px;
	line-height: 1.6;
	color: rgba( 255, 255, 255, .88 );
	display: -webkit-box;
	-webkit-line-clamp: 4;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aa-sr__ref {
	flex: none;
	align-self: flex-start;
	max-width: 12ch;
	font-size: 12px;
	color: rgba( 255, 255, 255, .75 );
	text-align: right;
	white-space: nowrap;
}

.aa-sr__ref span {
	display: block;
	font-family: var( --sr-display );
	font-size: 18px;
	color: var( --sr-white );
}

/* --- body grid: 3a ----------------------------------------------------- */

.aa-sr__body {
	position: relative;
	display: grid;
	grid-template-columns: minmax( 0, 1fr ) var( --sr-side );
	grid-template-areas:
		"shead    pin"
		"srows    pin"
		"timeline preview"
		"actions  preview"
		"tail     tail";
	grid-template-rows: auto auto auto auto 1fr;
	column-gap: 0;
	align-items: start;
	background: var( --sr-cream );
}

/* The white sidebar column, full height, behind its blocks. */
.aa-sr__side-bg {
	grid-column: 2;
	grid-row: 1 / -1;
	align-self: stretch;
	background: var( --sr-white );
	border-left: 1px solid var( --sr-rule );
}

/* The summary card's surface, behind its head and rows (and the pin, on a phone). */
.aa-sr__card-bg {
	grid-area: shead / shead / srows / srows;
	align-self: stretch;
	margin: 24px var( --sr-pad ) 0;
	background: var( --sr-white );
	border-radius: var( --sr-radius );
	box-shadow: var( --sr-shadow );
}

.aa-sr__summary-head {
	grid-area: shead;
	position: relative;
	display: flex;
	align-items: baseline;
	gap: 10px;
	margin: 24px var( --sr-pad ) 0;
	padding: 18px 18px 0;
	color: var( --sr-brown );
}

.aa-sr__summary-rows {
	grid-area: srows;
	position: relative;
	margin: 0 var( --sr-pad );
	padding: 13px 18px 18px;
	color: var( --sr-brown );
}

.aa-sr .aa-sr__card-title {
	flex: 1;
	min-width: 0;
	margin: 0;
	font-family: var( --sr-display );
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	color: var( --sr-brown );
}

.aa-sr__card-ref {
	flex: none;
	font-size: 11.5px;
	color: var( --sr-muted );
}

.aa-sr__rows {
	display: grid;
	grid-template-columns: 150px minmax( 0, 1fr );
	gap: 9px 16px;
	font-size: 13.5px;
	line-height: 1.5;
}

.aa-sr__rows dt {
	color: var( --sr-muted );
}

.aa-sr__rows dd {
	color: var( --sr-brown );
}

.aa-sr__rows strong {
	font-weight: 600;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aa-sr__none,
.aa-sr__nosnap {
	color: var( --sr-muted );
}

.aa-sr__nosnap {
	font-size: 13.5px;
}

/* Cards that are one grid item: the timeline. */
.aa-sr__card {
	background: var( --sr-white );
	color: var( --sr-brown );
	border-radius: var( --sr-radius );
	box-shadow: var( --sr-shadow );
	padding: 18px;
}

.aa-sr__timeline {
	grid-area: timeline;
	margin: 14px var( --sr-pad ) 0;
}

.aa-sr__timeline .aa-sr__card-title {
	margin-bottom: 14px;
}

.aa-sr__declined {
	font-size: 13.5px;
	color: var( --sr-muted );
}

.aa-sr__steps {
	list-style: none;
}

.aa-sr__step {
	position: relative;
	display: grid;
	grid-template-columns: 26px minmax( 0, 1fr );
	gap: 12px;
	padding-bottom: 16px;
}

.aa-sr__step:last-child {
	padding-bottom: 0;
}

/* The connecting rule, drawn from under one dot to the next. */
.aa-sr__step:not( :last-child )::before {
	content: '';
	position: absolute;
	left: 12px;
	top: 22px;
	bottom: 0;
	width: 2px;
	background: var( --sr-rule );
}

.aa-sr__dot {
	justify-self: center;
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	border-radius: 9999px;
	font-size: 11px;
	line-height: 1;
	color: var( --sr-white );
}

.aa-sr__step--done .aa-sr__dot {
	background: var( --sr-green );
}

.aa-sr__step--current .aa-sr__dot {
	background: var( --sr-orange );
	box-shadow: 0 0 0 4px rgba( 219, 104, 11, .18 );
}

.aa-sr__step--todo .aa-sr__dot {
	box-shadow: inset 0 0 0 2px var( --sr-rule );
}

.aa-sr__step-title {
	font-size: 14px;
	font-weight: 700;
	color: var( --sr-brown );
}

.aa-sr__step--todo .aa-sr__step-title {
	color: var( --sr-muted );
}

.aa-sr__now {
	margin-left: 6px;
	padding: 2px 8px;
	border-radius: 9999px;
	background: var( --sr-orange );
	color: var( --sr-white );
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	vertical-align: 1px;
}

.aa-sr__step-line {
	font-size: 12.5px;
	line-height: 1.5;
	color: var( --sr-muted );
}

/* --- actions ----------------------------------------------------------- */

.aa-sr__actions {
	grid-area: actions;
	display: flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	margin: 16px var( --sr-pad ) 32px;
}

/* Two classes deep on purpose. The primary pill is also .aa-points__cta, whose
   `display: inline-block` (aa-points.php, printed in <head> AFTER this file)
   ties a one-class selector and wins on order — the flex centring was lost and
   the min-height added space under the text only. */
.aa-sr .aa-sr__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	text-align: center;
}

.aa-sr .aa-sr__btn--primary {
	min-height: 52px;
	padding: .75em 1.6em;
	font-size: 1rem;
}

.aa-sr a.aa-sr__btn--secondary {
	padding: .6em 1.2em;
	border: 2px solid var( --sr-brown );
	border-radius: 999px;
	background: var( --sr-white );
	color: var( --sr-brown );
	font-weight: 700;
	font-size: .9rem;
	line-height: 1.3;
}

.aa-sr a.aa-sr__btn--secondary:hover,
.aa-sr a.aa-sr__btn--secondary:focus-visible {
	background: var( --sr-brown );
	color: var( --sr-white );
}

.aa-sr__solo {
	padding: 24px var( --sr-pad ) 32px;
	background: var( --sr-cream );
}

/* --- sidebar: pin and preview ------------------------------------------ */

.aa-sr .aa-sr__label {
	margin: 0 0 8px;
	font-family: var( --sr-display );
	font-size: 14px;
	font-weight: 400;
	letter-spacing: .6px;
	text-transform: uppercase;
	color: var( --sr-muted );
}

.aa-sr__pin {
	grid-area: pin;
	position: relative;
	padding: 24px var( --sr-pad ) 0;
}

.aa-sr__map {
	position: relative;
	height: 190px;
	border-radius: var( --sr-radius );
	overflow: hidden;
	background: #f2efe6;
	box-shadow: inset 0 0 0 1px var( --sr-rule );
}

/* Until Leaflet paints, and for good if it cannot, the coordinates are the content. */
.aa-sr__map-fallback {
	display: none;
}

.aa-sr__map.is-fallback .aa-sr__map-fallback {
	display: grid;
	place-items: center;
	height: 100%;
	padding: 12px;
	font-size: 13px;
	color: var( --sr-brown );
	text-align: center;
}

/* A map that is evidence, not a tool: no pointer affordances. */
.aa-sr__map .leaflet-container,
.aa-sr__map.leaflet-container {
	cursor: default;
}

.aa-sr__marker {
	width: 24px;
	height: 24px;
	margin: -24px 0 0 -12px;
	border-radius: 50% 50% 50% 0;
	background: var( --sr-green );
	border: 3px solid var( --sr-white );
	box-shadow: 0 1px 4px rgba( 0, 0, 0, .35 );
	transform: rotate( -45deg );
}

.aa-sr__preview {
	grid-area: preview;
	position: relative;
	padding: 16px var( --sr-pad ) 32px;
}

.aa-sr__preview-card {
	overflow: hidden;
	border-radius: var( --sr-radius );
	background: var( --sr-white );
	color: var( --sr-brown );
	box-shadow: var( --sr-shadow );
}

.aa-sr__preview-media {
	position: relative;
	height: 150px;
	overflow: hidden;
	background: var( --sr-yellow-light );
}

.aa-sr__preview-media--none {
	height: 104px;
}

/* Two classes deep: the theme's `img { height: auto }` otherwise wins and the
   photo spills over the card's title. */
.aa-sr .aa-sr__preview-media .aa-sr__preview-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

.aa-sr__badge {
	position: absolute;
	left: 9px;
	top: 9px;
	padding: 3px 8px;
	border-radius: 9999px;
	background: var( --sr-brown );
	color: var( --sr-white );
	font-size: 9.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.aa-sr__preview-body {
	padding: 13px;
}

.aa-sr__preview-title {
	margin-bottom: 3px;
	font-family: var( --sr-display );
	font-size: 19px;
	line-height: 1.2;
	color: var( --sr-brown );
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aa-sr__preview-sub {
	margin-bottom: 8px;
	font-size: 12.5px;
	color: var( --sr-muted );
}

.aa-sr__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.aa-sr__tag {
	padding: 3px 10px;
	border-radius: 9999px;
	background: var( --sr-cream );
	color: var( --sr-brown );
	font-size: 12px;
	font-weight: 600;
	box-shadow: inset 0 0 0 1px var( --sr-rule );
}

/* --- 3b: the column ---------------------------------------------------- */

@media ( max-width: 1023px ) {
	.aa-sr {
		--sr-pad: 16px;
		margin-bottom: 0;
	}

	.aa-sr__hero {
		padding: 22px 16px;
		text-align: center;
	}

	.aa-sr__hero-inner {
		flex-direction: column;
		align-items: center;
		gap: 12px;
	}

	.aa-sr__mark {
		width: 46px;
		height: 46px;
		font-size: 23px;
	}

	.aa-sr .aa-sr__heading {
		font-size: 26px;
	}

	.aa-sr__lede {
		font-size: 13px;
	}

	.aa-sr__ref {
		align-self: center;
		max-width: none;
		text-align: center;
	}

	.aa-sr__ref span {
		display: inline;
		font-size: 15px;
		margin-left: 4px;
	}

	.aa-sr__body {
		grid-template-columns: minmax( 0, 1fr );
		grid-template-areas:
			"shead"
			"pin"
			"srows"
			"timeline"
			"preview"
			"actions";
		grid-template-rows: none;
	}

	.aa-sr__side-bg {
		display: none;
	}

	.aa-sr__card-bg {
		margin-top: 16px;
	}

	.aa-sr__summary-head {
		margin-top: 16px;
		padding: 15px 15px 0;
	}

	.aa-sr__card-title,
	.aa-sr .aa-sr__card-title {
		font-size: 18px;
	}

	/* Inside the card, under its heading. */
	.aa-sr__pin {
		padding: 11px calc( var( --sr-pad ) + 15px ) 0;
	}

	.aa-sr__pin .aa-sr__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect( 0 0 0 0 );
	}

	.aa-sr__map {
		height: 150px;
	}

	.aa-sr__summary-rows {
		padding: 11px 15px 15px;
	}

	.aa-sr__rows {
		grid-template-columns: auto minmax( 0, 1fr );
		gap: 7px 12px;
		font-size: 12.5px;
	}

	.aa-sr__preview {
		padding: 14px var( --sr-pad ) 16px;
	}

	/* Primary action pinned to the bottom (3b). Sticky rather than fixed, so it
	   keeps its own space at the end of the page and never covers the last
	   block; the safe-area inset keeps it clear of the home indicator. */
	.aa-sr__actions {
		position: sticky;
		bottom: 0;
		z-index: 4;
		flex-direction: row;
		flex-wrap: nowrap;
		justify-content: space-between;
		gap: 10px;
		margin: 0;
		padding: 12px 16px calc( 12px + env( safe-area-inset-bottom, 0px ) );
		background: var( --sr-white );
		border-top: 1px solid var( --sr-rule );
	}

	.aa-sr .aa-sr__btn--primary {
		min-height: 44px;
		padding: .6em 1.1em;
		font-size: .9rem;
	}

	.aa-sr a.aa-sr__btn--secondary {
		padding: .45em .9em;
		font-size: .8rem;
		min-height: 40px;
	}
}

/* --- print (R27) ------------------------------------------------------- */

@media print {
	.aa-sr__pin,
	.aa-sr__actions,
	.aa-sr__side-bg,
	.aa-sr__admin {
		display: none !important;
	}

	.aa-sr,
	.aa-sr__hero {
		background: #fff !important;
		color: #000 !important;
	}

	.aa-sr__hero::before {
		display: none;
	}

	.aa-sr .aa-sr__heading,
	.aa-sr__lede,
	.aa-sr__ref,
	.aa-sr__ref span {
		color: #000 !important;
	}

	.aa-sr__body {
		display: block;
	}

	.aa-sr__card-bg {
		display: none;
	}

	.aa-sr__card,
	.aa-sr__preview-card {
		box-shadow: none;
		border: 1px solid #999;
	}

	.aa-sr__summary-head,
	.aa-sr__summary-rows {
		margin: 12px 0 0;
	}

	.aa-sr__timeline,
	.aa-sr__preview {
		margin: 12px 0 0;
		padding-left: 0;
		padding-right: 0;
	}
}
