/**
 * Pack-Out Spot blocks: the map and the Report prompt.
 *
 * Colors fall back to the Pack-Out Spot palette when the theme does not
 * define the Astra global colors.
 */

/* Inside a flex column (Spectra containers, core groups) the blocks take the full width. */
.pos-map,
.pos-report {
	box-sizing: border-box;
	width: 100%;
}

.pos-map {
	--pos-accent: var(--ast-global-color-2, #bb5e28);
	--pos-ink: var(--ast-global-color-8, #2f3232);
	--pos-line: #dcdcde;
	color: var(--pos-ink);
}

.pos-map__bar {
	display: flex;
	flex-wrap: wrap;
	align-items: end;
	gap: 12px 20px;
	margin-bottom: 12px;
}

.pos-map__filter {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 14px;
	font-weight: 600;
}

.pos-map__filter select {
	min-width: 190px;
	min-height: 44px;
	padding: 6px 10px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: var(--pos-ink);
	font: inherit;
	font-weight: 400;
}

.pos-map__count {
	margin-left: auto;
	padding-bottom: 10px;
	font-size: 15px;
}

.pos-map__body {
	position: relative;
	overflow: hidden;
	border: 1px solid var(--pos-line);
	border-radius: 6px;
	background: #edeae5;
}

.pos-map__canvas {
	position: absolute;
	inset: 0;
}

.pos-map__state {
	position: absolute;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%);
	max-width: calc(100% - 32px);
	padding: 10px 16px;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
	font-size: 15px;
	text-align: center;
}

.pos-map__state[hidden],
.pos-map__panel[hidden],
.pos-map__list[hidden] {
	display: none;
}

.pos-map__state--empty {
	top: 50%;
	bottom: auto;
	transform: translate(-50%, -50%);
	width: min(420px, calc(100% - 32px));
	padding: 24px;
}

.pos-map__panel {
	position: absolute;
	top: 12px;
	left: 12px;
	bottom: 12px;
	width: min(360px, calc(100% - 24px));
	overflow: auto;
	padding: 20px;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
	font-size: 16px;
	line-height: 1.5;
}

.pos-map__close {
	float: right;
	margin: -6px -6px 6px 12px;
	padding: 8px 12px;
	border: 1px solid var(--pos-line);
	border-radius: 4px;
	background: #fff;
	color: var(--pos-ink);
	font-size: 14px;
	cursor: pointer;
}

.pos-map__badges {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	font-size: 14px;
}

.pos-map .pos-map__title {
	margin: 0 0 10px;
	font-size: 22px;
	line-height: 1.15;
}

.pos-map__description,
.pos-map__where {
	margin: 10px 0;
}

.pos-map__where {
	font-size: 14px;
	color: #50575e;
}

.pos-map__link {
	display: inline-block;
	margin-top: 6px;
	font-weight: 700;
	color: var(--ast-global-color-3, #863d14);
}

.pos-map__list {
	margin-top: 12px;
	font-size: 16px;
}

.pos-map__list summary {
	cursor: pointer;
	font-weight: 600;
}

.pos-map__list ul {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	columns: 2 280px;
}

.pos-map__list li {
	margin: 0 0 6px;
	break-inside: avoid;
}

.pos-map__list-item {
	padding: 0;
	border: 0;
	background: none;
	color: var(--ast-global-color-3, #863d14);
	font: inherit;
	text-align: left;
	text-decoration: underline;
	cursor: pointer;
}

.pos-map__list-meta {
	font-size: 14px;
	color: #50575e;
}

.pos-map button:focus-visible,
.pos-map select:focus-visible,
.pos-map a:focus-visible,
.pos-map summary:focus-visible {
	outline: 2px solid var(--pos-accent);
	outline-offset: 2px;
}

.pos-ui .vectra-ui__fallback {
	font-weight: 600;
}

@media (max-width: 600px) {
	.pos-map__panel {
		top: auto;
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		max-height: 70%;
	}

	.pos-map__count {
		margin-left: 0;
		padding-bottom: 0;
	}

	.pos-map__filter,
	.pos-map__filter select {
		width: 100%;
	}
}

/* Report prompt. */
.pos-report__field {
	margin-top: 20px;
	font-size: 15px;
}

/* The public page of one Spot. */
.pos-spot-page__meta {
	font-weight: 700;
}

.pos-spot-page__place {
	margin: 0 0 12px;
}

.pos-spot-page__hazard {
	padding: 14px 18px;
	border-left: 4px solid var(--ast-global-color-2, #bb5e28);
	background: var(--ast-global-color-5, #edeae5);
}

/* The report form: a Toolkit Form inside the Report prompt. */

.pos-report__form .vectra-form {
	max-width: none;
}

.pos-report__form .vectra-form-grid {
	gap: 20px 16px;
	margin-bottom: 24px;
}

.pos-report__form .vectra-label {
	margin-bottom: 2px;
	color: var(--ast-global-color-8, #2f3232);
	font-size: 1rem;
	font-weight: 700;
}

.pos-report__form .vectra-description {
	margin: 0 0 8px;
	color: #5b6060;
	font-size: 0.9rem;
	line-height: 1.4;
}

.pos-report__form .vectra-field input[type="text"],
.pos-report__form .vectra-field input[type="email"],
.pos-report__form .vectra-field input[type="number"],
.pos-report__form .vectra-field select,
.pos-report__form .vectra-field textarea {
	min-height: 48px;
	padding: 10px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
	color: var(--ast-global-color-8, #2f3232);
	font: inherit;
}

.pos-report__form .vectra-field textarea {
	min-height: 120px;
}

.pos-report__form .vectra-field-error,
.pos-report__form .vectra-form-errors,
.pos-report__form .vectra-required {
	color: #a12a1b;
}

.pos-report__form .vectra-form-confirmation {
	padding: 20px 24px;
	border: 0;
	border-left: 4px solid #415840;
	background: #eef2ea;
	font-size: 1.05rem;
}

/* "Use my location" sits on its own row above the coordinates. */
.pos-report__locate {
	display: flex;
	flex: 1 1 100%;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 14px;
	margin: 0;
	font-size: 0.9rem;
}

.pos-report__locate-button {
	min-height: 44px;
	padding: 0 16px;
	border: 2px solid var(--ast-global-color-8, #2f3232);
	border-radius: 4px;
	background: transparent;
	color: var(--ast-global-color-8, #2f3232);
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.pos-report__locate-button:hover,
.pos-report__locate-button:focus {
	background: var(--ast-global-color-8, #2f3232);
	color: #fff;
}

.pos-report__locate-button:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Team list */

.pos-teams {
	box-sizing: border-box;
	width: 100%;
}

/* The class is repeated so a theme's list spacing inside page content does not win. */
.pos-teams .pos-teams__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.pos-teams__team {
	margin: 0;
	padding: 20px 22px;
	border: 1px solid #d9d4c8;
	border-radius: 6px;
	background: #fff;
}

.pos-teams__name {
	margin: 0 0 8px;
	font-size: 1.25rem;
}

.pos-teams__text {
	margin: 0 0 10px;
}

.pos-teams__facts {
	margin: 0;
	color: #5b6060;
	font-size: 0.95rem;
}

/* Public team and mission pages */

.pos-team-page h2 {
	margin: 1.6em 0 0.5em;
	font-size: 1.5rem;
}

.pos-team-page .pos-team-page__missions {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pos-team-page__missions li {
	padding: 12px 0;
	border-bottom: 1px solid #d9d4c8;
}

.pos-team-page__facts {
	display: block;
	color: #5b6060;
	font-size: 0.95rem;
}

.pos-mission-page dl {
	display: grid;
	grid-template-columns: max-content 1fr;
	gap: 6px 18px;
	margin: 0 0 18px;
}

.pos-mission-page dt {
	font-weight: 600;
}

.pos-mission-page dd {
	margin: 0;
}

/* Impact summary */

.pos-impact {
	box-sizing: border-box;
	width: 100%;
}

.pos-impact__line {
	margin: 0 0 24px;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
}

.pos-impact__empty {
	display: flex;
	justify-content: center;
	padding: 36px 24px;
	border: 1px solid #d9d4c8;
	border-radius: 6px;
	background: #fff;
	color: #2f3232;
	text-align: center;
}

.pos-impact__groups {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
	gap: 20px;
}

.pos-impact__group {
	padding: 22px 24px;
	border: 1px solid #d9d4c8;
	border-radius: 6px;
	background: #fff;
	color: #2f3232;
}

.pos-impact .pos-impact__title {
	margin: 0 0 12px;
	font-size: 1.25rem;
	color: #2f3232;
}

.pos-impact .pos-impact__figures {
	margin: 0;
}

.pos-impact__figure {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	align-items: baseline;
	padding: 8px 0;
	border-top: 1px solid #e3e0d8;
}

.pos-impact__figure dt {
	margin: 0;
	font-weight: 400;
}

.pos-impact__figure dd {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.pos-impact__note {
	margin: 18px 0 0;
	font-size: 0.95rem;
}

.pos-teams__logo {
	display: block;
	width: 3.5rem;
	height: 3.5rem;
	margin-block-end: 0.6rem;
	object-fit: contain;
	border-radius: 6px;
	background: #fff;
}
