/* Base layout for belegstellen-karte */
:root {
	--bg: #f4f6f8;
	--surface: #ffffff;
	--surface-soft: #f9fbfc;
	--text: #1e2a32;
	--muted: #667781;
	--primary: #0f766e;
	--primary-strong: #115e59;
	--border: #dce3e8;
	--radius: 14px;
	--shadow: 0 10px 30px rgba(25, 47, 61, 0.08);
	--max-width: 1120px;
}

* {
	box-sizing: border-box;
}

/* Generic / Contao reset helpers */
.float_left {
	float: left;
}

.float_right {
	float: right;
}

.invisible {
	border: 0;
	clip: rect(0 0 0 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

html,
body {
	margin: 0;
	padding: 0;
}

body {
	font-family: "Nunito", "Segoe UI", sans-serif;
	color: var(--text);
	background: linear-gradient(180deg, #eef3f6 0%, #f8fafb 100%);
	line-height: 1.5;
}

a {
	color: var(--primary);
	text-decoration: none;
}

a:hover {
	color: var(--primary-strong);
	text-decoration: underline;
}

#wrapper,
#container {
	width: 100%;
}

#main,
.mod_article,
main {
	width: min(100% - 2rem, var(--max-width));
	margin: 1.5rem auto;
}

.block {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.25rem;
}

h1,
h2,
h3,
h4 {
	color: #10252f;
	line-height: 1.2;
	margin-top: 0;
}

h1 {
	font-size: clamp(1.5rem, 2.6vw, 2.2rem);
}

h2 {
	font-size: clamp(1.3rem, 2.1vw, 1.8rem);
}

h3 {
	font-size: clamp(1.1rem, 1.8vw, 1.35rem);
	margin-bottom: 0.6rem;
}

p {
	margin-top: 0;
	color: var(--muted);
}

/* Generic content cards */
.ce_text,
.mod_article,
.apiculture-map-module,
form {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 1.25rem;
}

/* Form baseline */
form {
	display: grid;
	gap: 0.75rem;
}

label {
	font-weight: 700;
	color: #1f333d;
}

input,
select,
textarea,
button {
	width: 100%;
	max-width: 100%;
	border: 1px solid var(--border);
	border-radius: 10px;
	background: var(--surface-soft);
	color: var(--text);
	font: inherit;
	padding: 0.62rem 0.72rem;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus,
button:focus {
	outline: none;
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

input.submit,
button,
[type="submit"] {
	width: auto;
	justify-self: start;
	border: 0;
	background: linear-gradient(135deg, var(--primary), #15847b);
	color: #fff;
	font-weight: 700;
	cursor: pointer;
	padding: 0.7rem 1rem;
}

input.submit:hover,
button:hover,
[type="submit"]:hover {
	background: linear-gradient(135deg, var(--primary-strong), #126b64);
}

/* Better spacing for the current listing form */
form h3 {
	margin: 0.85rem 0 0.25rem;
}

form br {
	display: none;
}

/* ce_apiculture_breed */
.api-form-wrap {
	border: 1px solid #d5dbe3;
	border-radius: 8px;
	padding: 18px;
	background: #f8fafc;
}

.api-form-wrap form {
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
}

.api-fieldset {
	margin: 0 0 14px;
	border: 1px solid #c9d4e3;
	border-radius: 8px;
	padding: 10px 12px 12px;
	background: #ffffff;
}

.api-fieldset legend {
	padding: 0 8px;
	font-size: 14px;
	font-weight: 700;
	color: #1b365d;
}

.api-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 10px 14px;
}

.api-variant-block {
	display: grid;
	gap: 10px 14px;
}

.api-form-grid label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-weight: 600;
	font-size: 14px;
}

.api-form-wrap [hidden] {
	display: none !important;
}

.api-form-grid input,
.api-form-grid select,
.api-form-grid textarea {
	border: 1px solid #b8c3d2;
	border-radius: 6px;
	padding: 8px 10px;
	font-size: 14px;
	font-weight: 400;
	background: #fff;
}

.api-form-grid textarea {
	min-height: 90px;
	resize: vertical;
}

.api-form-grid .api-span-2 {
	grid-column: span 2;
}

.api-span-full {
	grid-column: 1 / -1;
}

.api-mother-grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.api-general-grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
}

.api-hint {
	margin: 2px 0 0;
	font-size: 12px;
	font-weight: 400;
	color: #475569;
}

.api-form-footer {
	margin-top: 14px;
	display: flex;
	gap: 12px;
	align-items: center;
}

.api-form-btn {
	border: 1px solid #1b4d8a;
	background: #1f5fa8;
	color: #fff;
	border-radius: 6px;
	padding: 9px 16px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.api-color-note {
	display: block;
	font-size: 13px;
	font-weight: 400;
	color: #1e293b;
}

.api-year-color-swatch {
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 1px solid #94a3b8;
	vertical-align: middle;
}

.api-hidden {
	display: none;
}

/* ce_apiculture_mating_station_map */
.api-station-map-wrap {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 12px;
	padding: 1rem;
	box-shadow: var(--shadow);
}

.api-station-map-toolbar {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	align-items: end;
	margin-bottom: 0.8rem;
}

.api-station-map-toolbar h3 {
	margin: 0;
}

.api-station-map-filters {
	display: flex;
	gap: 0.8rem;
	flex-wrap: wrap;
}

.api-station-map-filters label {
	display: grid;
	gap: 0.3rem;
	font-size: 0.9rem;
	font-weight: 700;
}

.api-station-map-filters select {
	min-width: 160px;
}

.api-station-map-canvas {
	width: 100%;
	min-height: 460px;
	border-radius: 10px;
	border: 1px solid var(--border);
	overflow: hidden;
}

.api-station-map-empty {
	margin: 0.8rem 0 0;
	color: var(--muted);
}

.api-station-popup-title {
	margin: 0 0 0.35rem;
	font-weight: 800;
}

.api-station-popup-meta {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.4;
	color: #33434d;
}

.api-station-popup-links {
	margin-top: 0.45rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
}

.api-station-popup-links a {
	font-size: 0.82rem;
	padding: 0.2rem 0.5rem;
	border-radius: 999px;
	background: #e8f5f4;
	text-decoration: none;
}

.api-station-popup-status {
	display: inline-block;
	margin-top: 0.4rem;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 0.15rem 0.45rem;
	border-radius: 999px;
	background: #f0f4f7;
	color: #2d3b46;
}

.api-station-popup-status.is-available {
	background: #e3f6ec;
	color: #1f6a3a;
}

/* Map module */
.apiculture-map-module {
	display: grid;
	gap: 0.75rem;
}

#apiculture-map-canvas {
	min-height: 360px;
	border-radius: 12px;
	border: 1px solid var(--border);
	background:
		radial-gradient(circle at 25% 30%, rgba(21, 132, 123, 0.18), transparent 40%),
		radial-gradient(circle at 75% 65%, rgba(17, 94, 89, 0.2), transparent 45%),
		linear-gradient(180deg, #edf5f4 0%, #dae9e7 100%);
}

@media (max-width: 768px) {
	#main,
	.mod_article,
	main {
		width: min(100% - 1rem, var(--max-width));
		margin: 0.8rem auto;
	}

	.ce_text,
	.mod_article,
	.apiculture-map-module,
	form {
		padding: 0.95rem;
		border-radius: 12px;
	}

	#apiculture-map-canvas {
		min-height: 280px;
	}

	.api-station-map-toolbar {
		flex-direction: column;
		align-items: stretch;
	}

	.api-station-map-canvas {
		min-height: 320px;
	}

	.api-mother-grid {
		grid-template-columns: 1fr;
	}

	.api-form-grid .api-span-2 {
		grid-column: span 1;
	}

	.api-span-full {
		grid-column: span 1;
	}
}