/* ============================================================
   Tobalt Maudyklos – map and single-page styles
   ============================================================ */

/* ── Wrapper ────────────────────────────────────────────────── */
.tobalt-maudyklos-wrap {
	margin: 1.5rem 0;
}

/* ── Map container ──────────────────────────────────────────── */
#tobalt-maudyklos-map,
.tobalt-maudyklos-mini-map {
	width:  100%;
	height: 70vh;
	min-height: 360px;
	border-radius: 6px;
	border: 1px solid #d0d0d0;
}

.tobalt-maudyklos-mini-map {
	height: 300px;
	min-height: 200px;
	margin: 1rem 0;
}

/* ── Controls bar ───────────────────────────────────────────── */
.tobalt-maudyklos-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
	margin-bottom: 0.75rem;
}

.tobalt-maudyklos-controls select,
.tobalt-maudyklos-controls input[type="search"] {
	flex: 1 1 180px;
	padding: 0.45rem 0.65rem;
	border: 1px solid #bbb;
	border-radius: 4px;
	font-size: 0.9rem;
	background: #fff;
	color: #333;
	max-width: 260px;
}

.tobalt-maudyklos-toggle-label {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.9rem;
	cursor: pointer;
	white-space: nowrap;
}

/* ── Legend ─────────────────────────────────────────────────── */
.tobalt-maudyklos-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 0.75rem;
	font-size: 0.85rem;
}

.tobalt-maudyklos-legend-item {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.tobalt-maudyklos-legend-item::before {
	content: '';
	display: inline-block;
	width:  14px;
	height: 14px;
	border-radius: 50%;
	flex-shrink: 0;
}

.tobalt-maudyklos-legend--atitinka::before   { background: #1a9850; }
.tobalt-maudyklos-legend--neatitinka::before { background: #d73027; }
.tobalt-maudyklos-legend--nera::before       { background: #999; }

/* ── Popup ───────────────────────────────────────────────────── */
.tobalt-maudyklos-popup {
	min-width: 160px;
	font-size: 0.875rem;
	line-height: 1.4;
}

.tobalt-maudyklos-popup strong {
	display: block;
	font-size: 0.95rem;
	margin-bottom: 0.3rem;
}

.tobalt-maudyklos-popup__mun,
.tobalt-maudyklos-popup__latest {
	margin: 0.2rem 0;
	color: #555;
}

.tobalt-maudyklos-popup__link {
	display: inline-block;
	margin-top: 0.4rem;
	color: #0073aa;
	text-decoration: underline;
}

/* ── Single-maudykla page ───────────────────────────────────── */
.tobalt-maudyklos-single {
	max-width: 900px;
	margin: 0 auto;
	padding: 0 1rem;
}

.tobalt-maudyklos-single__meta {
	color: #555;
	font-size: 0.95rem;
	margin-bottom: 0.5rem;
}

.tobalt-maudyklos-single__status {
	display: inline-block;
	padding: 0.2rem 0.7rem;
	border-radius: 3px;
	font-size: 0.85rem;
	font-weight: 600;
	color: #fff;
	margin-bottom: 1rem;
}

.tobalt-maudyklos-single__status--atitinka   { background: #1a9850; }
.tobalt-maudyklos-single__status--neatitinka { background: #d73027; }
.tobalt-maudyklos-single__status--nera       { background: #999; }

/* ── Samples table ───────────────────────────────────────────── */
.tobalt-maudyklos-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
	margin-top: 1.25rem;
	overflow-x: auto;
}

.tobalt-maudyklos-table caption {
	text-align: left;
	font-weight: 600;
	font-size: 1rem;
	margin-bottom: 0.5rem;
	caption-side: top;
}

.tobalt-maudyklos-table th,
.tobalt-maudyklos-table td {
	border: 1px solid #ddd;
	padding: 0.45rem 0.6rem;
	text-align: left;
	vertical-align: top;
}

.tobalt-maudyklos-table thead th {
	background: #f4f4f4;
	font-weight: 600;
	white-space: nowrap;
}

.tobalt-maudyklos-table tbody tr:nth-child(even) {
	background: #fafafa;
}

.tobalt-maudyklos-table td.tobalt-maudyklos-table__atitinka {
	color: #1a9850;
	font-weight: 600;
}

.tobalt-maudyklos-table td.tobalt-maudyklos-table__neatitinka {
	color: #d73027;
	font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media ( max-width: 600px ) {
	#tobalt-maudyklos-map {
		height: 55vw;
		min-height: 240px;
	}

	.tobalt-maudyklos-controls {
		flex-direction: column;
		align-items: stretch;
	}

	.tobalt-maudyklos-controls select,
	.tobalt-maudyklos-controls input[type="search"] {
		max-width: 100%;
	}

	.tobalt-maudyklos-legend {
		gap: 0.6rem;
	}

	.tobalt-maudyklos-table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}
