/* WebPex Radio Stations — front end */

.wrs-wrap,
.wrs-wrap * {
	box-sizing: border-box;
}

.wrs-wrap {
	--wrs-accent: #f2782f;
	--wrs-dark: #2e3342;
	--wrs-dark-soft: #3a4152;
	--wrs-ink: #1c2033;
	--wrs-muted: #6b7280;
	--wrs-line: #eceef3;
	--wrs-tile: #eef0fb;

	max-width: 1200px;
	margin: 0 auto;
	font-family: inherit;
	color: var(--wrs-ink);
}

/* ---- Map ---- */
.wrs-map-shell {
	position: relative;
	border-radius: 20px;
	overflow: hidden;
	background: var(--wrs-dark);
	box-shadow: 0 18px 44px rgba(28, 32, 51, 0.16);
}

.wrs-map {
	height: var(--wrs-map-height, 620px);
	width: 100%;
}

/* Leaflet paints its own background; this is the "ocean". */
.wrs-map.leaflet-container {
	background: var(--wrs-dark);
	font-family: inherit;
}

.wrs-map .leaflet-control-zoom {
	border: 0;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.wrs-map .leaflet-control-zoom a {
	background: #363c4c;
	color: #fff;
	border-color: #444b5e;
}
.wrs-map .leaflet-control-zoom a:hover {
	background: #414859;
}

/* Station count pill */
.wrs-count {
	position: absolute;
	left: 22px;
	bottom: 22px;
	z-index: 500;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 9px 18px 9px 14px;
	border-radius: 999px;
	background: rgba(20, 23, 33, 0.92);
	color: #e8eaf0;
	font-size: 13px;
	font-weight: 600;
	backdrop-filter: blur(4px);
}
.wrs-count-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--wrs-accent);
	box-shadow: 0 0 0 4px rgba(242, 120, 47, 0.22);
}

/* ---- Markers ---- */
.wrs-marker-wrap {
	background: none;
	border: 0;
}
.wrs-marker {
	position: relative;
	display: block;
	width: 18px;
	height: 18px;
}
.wrs-marker-dot {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--wrs-accent);
	box-shadow:
		0 0 0 5px rgba(242, 120, 47, 0.25),
		0 0 18px 4px rgba(242, 120, 47, 0.5);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.wrs-marker-label {
	position: absolute;
	left: 24px;
	top: 50%;
	transform: translateY(-50%);
	white-space: nowrap;
	font-size: 12.5px;
	font-weight: 600;
	color: #f2f4f8;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
	pointer-events: none;
}
.wrs-marker-wrap:hover .wrs-marker-dot,
.wrs-marker.is-active .wrs-marker-dot {
	transform: scale(1.28);
	box-shadow:
		0 0 0 7px rgba(242, 120, 47, 0.32),
		0 0 26px 7px rgba(242, 120, 47, 0.65);
}

/* ---- Popup ---- */
.wrs-popup-shell .leaflet-popup-content-wrapper {
	border-radius: 14px;
	padding: 4px;
	box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
}
.wrs-popup-shell .leaflet-popup-content {
	margin: 14px 16px;
	font-family: inherit;
}
.wrs-popup-city {
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--wrs-accent);
	margin-bottom: 5px;
}
.wrs-popup-name {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 800;
	line-height: 1.2;
	color: var(--wrs-ink);
}
.wrs-popup-freq {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 10px;
	border-radius: 999px;
	background: rgba(242, 120, 47, 0.12);
	color: #b8551a;
	font-size: 13px;
	font-weight: 800;
}
.wrs-popup-when {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: var(--wrs-muted);
}
.wrs-popup-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: 13px;
}
.wrs-popup-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 9px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--wrs-accent);
	color: #fff;
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease;
}
.wrs-popup-btn:hover {
	background: #d95f18;
}
.wrs-popup-site {
	text-align: center;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--wrs-muted) !important;
	text-decoration: underline !important;
}

/* ---- Station list ---- */
.wrs-list {
	display: grid;
	grid-template-columns: repeat(var(--wrs-cols, 3), minmax(0, 1fr));
	gap: 20px;
	margin-top: 46px;
}

.wrs-card {
	position: relative;
	padding: 22px;
	border: 1px solid var(--wrs-line);
	border-radius: 16px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.wrs-card:hover {
	border-color: #dfe3ec;
	box-shadow: 0 10px 26px rgba(28, 32, 51, 0.08);
	transform: translateY(-2px);
}

/* Selected from the map — matches the pin glow so the link is obvious. */
.wrs-card.is-active {
	border-color: var(--wrs-accent);
	background: rgba(242, 120, 47, 0.07);
	box-shadow: 0 0 0 3px rgba(242, 120, 47, 0.35), 0 14px 34px rgba(242, 120, 47, 0.2);
	animation: wrs-pulse 1.2s ease-in-out 3;
}
@keyframes wrs-pulse {
	0%, 100% { box-shadow: 0 0 0 3px rgba(242, 120, 47, 0.35), 0 14px 34px rgba(242, 120, 47, 0.2); }
	50%      { box-shadow: 0 0 0 7px rgba(242, 120, 47, 0.45), 0 18px 40px rgba(242, 120, 47, 0.3); }
}
@media (prefers-reduced-motion: reduce) {
	.wrs-card.is-active { animation: none; }
	.wrs-card { transition: none; }
}

.wrs-card-top {
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.wrs-card-icon {
	flex: 0 0 46px;
	width: 46px;
	height: 46px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: var(--wrs-tile);
	color: var(--wrs-accent);
	overflow: hidden;
}
.wrs-card-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.wrs-card-main {
	flex: 1 1 auto;
	min-width: 0;
}
.wrs-card-name {
	margin: 0 0 3px;
	font-size: 17px;
	font-weight: 800;
	line-height: 1.25;
	color: var(--wrs-ink);
}
.wrs-card-city {
	margin: 0;
	font-size: 14px;
	color: var(--wrs-muted);
}
.wrs-card-freq {
	flex: 0 0 auto;
	font-size: 14px;
	font-weight: 800;
	color: var(--wrs-accent);
	white-space: nowrap;
}

.wrs-card-when {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 16px 0 0;
	padding-top: 14px;
	border-top: 1px solid var(--wrs-line);
	font-size: 13.5px;
	color: var(--wrs-muted);
}
.wrs-card-when svg {
	flex: 0 0 auto;
	color: var(--wrs-accent);
}

.wrs-card-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 12px;
	font-size: 13px;
	font-weight: 700;
	color: var(--wrs-accent) !important;
	text-decoration: none !important;
}
.wrs-card-link:hover {
	text-decoration: underline !important;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
	.wrs-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 720px) {
	.wrs-map {
		height: min(var(--wrs-map-height, 620px), 60vh);
	}
	.wrs-list {
		grid-template-columns: 1fr;
		gap: 16px;
		margin-top: 30px;
	}
	.wrs-count {
		left: 14px;
		bottom: 14px;
		font-size: 12px;
		padding: 8px 14px 8px 11px;
	}
	/* Labels crowd a small screen; the popup still names the station. */
	.wrs-marker-label {
		display: none;
	}
	.wrs-map-shell {
		border-radius: 16px;
	}
}

/* =========================================================================
   Submission form
   ====================================================================== */

.wrs-form-wrap,
.wrs-form-wrap * {
	box-sizing: border-box;
}

.wrs-form-wrap {
	--wrs-accent: #f2782f;
	--wrs-field: #fdf7f2;
	--wrs-field-line: #f6d9c4;
	--wrs-ink: #16181d;
	--wrs-muted: #9aa0aa;

	max-width: 900px;
	margin: 0 auto;
	padding: clamp(24px, 4vw, 52px);
	background: #fff;
	border-radius: 28px;
	box-shadow: 0 20px 60px rgba(28, 32, 51, 0.07);
	font-family: inherit;
	color: var(--wrs-ink);
}

.wrs-form-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px 24px;
}

.wrs-field {
	grid-column: 1 / -1;
	min-width: 0;
}
.wrs-field--half {
	grid-column: span 1;
}

.wrs-field label {
	display: block;
	margin-bottom: 9px;
	font-size: 13.5px;
	font-weight: 800;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--wrs-ink);
}

.wrs-field input,
.wrs-field select,
.wrs-field textarea {
	width: 100%;
	padding: 15px 18px;
	border: 1px solid var(--wrs-field-line);
	border-radius: 12px;
	background: var(--wrs-field);
	color: var(--wrs-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.4;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
	appearance: none;
	-webkit-appearance: none;
}
.wrs-field select {
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 17px;
	padding-right: 44px;
	cursor: pointer;
}
.wrs-field input::placeholder,
.wrs-field textarea::placeholder {
	color: var(--wrs-muted);
}
.wrs-field input:focus,
.wrs-field select:focus,
.wrs-field textarea:focus {
	outline: none;
	background: #fff;
	border-color: var(--wrs-accent);
	box-shadow: 0 0 0 4px rgba(242, 120, 47, 0.14);
}

.wrs-submit {
	width: 100%;
	margin-top: 28px;
	padding: 19px 24px;
	border: 0;
	border-radius: 12px;
	background: var(--wrs-accent);
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease;
}
.wrs-submit:hover {
	background: #dd6520;
	transform: translateY(-1px);
}
.wrs-submit:active {
	transform: none;
}

/* Honeypot — kept reachable to bots, invisible and skipped for everyone else. */
.wrs-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Result notices */
.wrs-notice {
	margin: 0 0 26px;
	padding: 18px 22px;
	border-radius: 14px;
	font-size: 15px;
	line-height: 1.55;
}
.wrs-notice p {
	margin: 6px 0 0;
}
.wrs-notice--ok {
	background: rgba(242, 120, 47, 0.1);
	border-left: 4px solid var(--wrs-accent);
	color: #8a3d0c;
}
.wrs-notice--bad {
	background: #fdeceb;
	border-left: 4px solid #d63638;
	color: #8a1f22;
}

@media (max-width: 640px) {
	.wrs-form-wrap {
		border-radius: 20px;
	}
	.wrs-form-grid {
		grid-template-columns: 1fr;
		gap: 18px;
	}
	.wrs-field--half {
		grid-column: 1 / -1;
	}
}

/* ---- Form headings & required marker ---- */
.wrs-form-title {
	margin: 0 0 14px;
	font-size: clamp(22px, 3vw, 30px);
	font-weight: 800;
	text-align: center;
	color: var(--wrs-ink);
}
.wrs-form-intro {
	margin: 0 0 22px;
	font-size: 15.5px;
	line-height: 1.6;
	color: #4b5563;
}
.wrs-form-required {
	margin: 0 0 22px;
	font-size: 14.5px;
	font-style: italic;
	text-align: center;
	color: #4b5563;
}
.wrs-req {
	margin-left: 2px;
	color: #d63638;
}

/* ---- Letter preview ----
   Shown below the form so the visitor reads the exact letter being sent,
   filling in live as they type. Editable: an edited letter is sent verbatim. */
.wrs-preview {
	margin-top: 34px;
	padding: 22px;
	border: 1px solid #e6e8ef;
	border-radius: 16px;
	background: #f7f8fa;
}
.wrs-preview-label {
	margin: 0 0 14px;
	font-size: 13.5px;
	font-weight: 700;
	color: #4b5563;
}
.wrs-preview-subject,
.wrs-preview-body {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid #dcdfe6;
	border-radius: 10px;
	background: #fff;
	color: var(--wrs-ink);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.6;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.wrs-preview-subject {
	margin-bottom: 12px;
	font-weight: 700;
}
.wrs-preview-body {
	min-height: 320px;
	resize: vertical;
	white-space: pre-wrap;
}
.wrs-preview-subject:focus,
.wrs-preview-body:focus {
	outline: none;
	border-color: var(--wrs-accent);
	box-shadow: 0 0 0 4px rgba(242, 120, 47, 0.14);
}
.wrs-preview-note {
	margin: 12px 0 0;
	font-size: 13px;
	color: #8a5a10;
}
.wrs-preview-reset {
	padding: 0;
	border: 0;
	background: none;
	color: var(--wrs-accent);
	font-family: inherit;
	font-size: 13px;
	font-weight: 700;
	text-decoration: underline;
	cursor: pointer;
}

/* The send button sits above the letter, as in the reference layout. */
.wrs-form .wrs-submit {
	max-width: 320px;
	margin-left: auto;
	margin-right: auto;
	display: block;
}

@media (max-width: 640px) {
	.wrs-preview {
		padding: 16px;
	}
	.wrs-preview-body {
		min-height: 260px;
		font-size: 14.5px;
	}
}

/* ---- Letter preview ---- */
.wrs-form-lead {
	margin: 0 0 26px;
	font-style: italic;
	font-size: 15px;
	color: #6b7280;
	text-align: center;
}
.wrs-req {
	color: #d63638;
	margin-left: 2px;
}

.wrs-preview {
	margin-top: 34px;
	padding: 22px;
	background: #f4f4f6;
	border-radius: 16px;
}
.wrs-preview-title {
	margin: 0 0 4px;
	font-size: 16px;
	font-weight: 800;
	color: #16181d;
}
.wrs-preview-hint {
	margin: 0 0 16px;
	font-size: 13.5px;
	color: #6b7280;
}
.wrs-preview-subject,
.wrs-preview-body {
	width: 100%;
	padding: 14px 16px;
	border: 1px solid #dcdfe5;
	border-radius: 8px;
	background: #fff;
	color: #16181d;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.6;
}
.wrs-preview-subject {
	margin-bottom: 14px;
	font-weight: 700;
}
.wrs-preview-body {
	min-height: 320px;
	resize: vertical;
	white-space: pre-wrap;
}
.wrs-preview-subject:focus,
.wrs-preview-body:focus {
	outline: none;
	border-color: var(--wrs-accent);
	box-shadow: 0 0 0 4px rgba(242, 120, 47, 0.14);
}

/* Visually hidden, still read by screen readers. */
.wrs-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Single checkbox field, for anything the owner adds as a yes/no question. */
.wrs-field .wrs-check {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 14px 16px;
	border: 1px solid var(--wrs-field-line);
	border-radius: 12px;
	background: var(--wrs-field);
	font-size: 15px;
	font-weight: 400;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
}
.wrs-field .wrs-check input {
	width: auto;
	margin: 2px 0 0;
	flex: 0 0 auto;
	accent-color: var(--wrs-accent);
}
.wrs-field .wrs-check span {
	line-height: 1.45;
}
