/* CWS Water Quality Table — base styles (colors overridable via Style tab) */

.cws-wqt__wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid #dbe4f0;
	border-radius: 16px;
	background: #fff;
}

.cws-wqt__wrap--shadow {
	box-shadow: 0 12px 30px rgba(11, 37, 69, 0.08);
}

table.cws-wqt {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
	font-size: 15px;
	line-height: 1.6;
}

.cws-wqt thead th {
	background: #0b2545;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	text-align: left;
	padding: 14px 16px;
}

.cws-wqt tbody td {
	padding: 13px 16px;
	border-top: 1px solid #dbe4f0;
	vertical-align: top;
	color: #1f2a3d;
}

.cws-wqt tbody tr:nth-child(even) {
	background: #f6f9fd;
}

.cws-wqt tbody td.cws-wqt__item {
	font-weight: 700;
	color: #0b2545;
	white-space: nowrap;
}

.cws-wqt tbody td.cws-wqt__num {
	font-size: 14px;
	white-space: nowrap;
}

@media (max-width: 767px) {
	table.cws-wqt {
		font-size: 14px;
	}

	.cws-wqt thead th,
	.cws-wqt tbody td {
		padding: 11px 12px;
	}
}

/* ============================================================
   Icon tiles layout
   ============================================================ */

.cws-wqt-tiles {
	--cws-navy: #0b2545;
	--cws-navy2: #13315c;
	--cws-aqua: #2ec4b6;
	--cws-aqua-soft: #eaf7f5;
	--cws-muted: #5a6b85;
	--cws-line: #dde6f1;
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.cws-wqt-tiles__list {
	flex: 1 1 340px;
	display: grid;
	grid-template-columns: repeat(var(--cws-wqt-cols, 2), minmax(0, 1fr));
	gap: 9px;
	min-width: 0;
}

.cws-wqt-tile {
	display: flex;
	align-items: center;
	gap: 11px;
	width: 100%;
	padding: 12px 13px;
	border: 1px solid var(--cws-line);
	border-radius: 13px;
	background: #fff;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.cws-wqt-tile:hover,
.cws-wqt-tile:focus-visible {
	border-color: var(--cws-aqua);
	box-shadow: 0 6px 18px rgba(46, 196, 182, 0.16);
	transform: translateY(-1px);
	outline: none;
}

.cws-wqt-tile.is-active {
	background: var(--cws-navy);
	border-color: var(--cws-navy);
}

.cws-wqt-tile__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--cws-aqua-soft);
	color: #0f6e56;
	transition: background 0.2s ease, color 0.2s ease;
}

.cws-wqt-tile.is-active .cws-wqt-tile__icon {
	background: rgba(255, 255, 255, 0.14);
	color: var(--cws-aqua);
}

.cws-wqt-tile__icon svg {
	width: 19px;
	height: 19px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cws-wqt-tile__text {
	min-width: 0;
}

.cws-wqt-tile__name {
	display: block;
	font-weight: 700;
	font-size: 14px;
	line-height: 1.25;
	color: var(--cws-navy);
}

.cws-wqt-tile__val {
	display: block;
	margin-top: 1px;
	font-size: 11.5px;
	color: var(--cws-muted);
}

.cws-wqt-tile.is-active .cws-wqt-tile__name {
	color: #fff;
}

.cws-wqt-tile.is-active .cws-wqt-tile__val {
	color: rgba(255, 255, 255, 0.72);
}

.cws-wqt-tiles__panel {
	flex: 1 1 300px;
	position: sticky;
	top: 16px;
	min-height: 230px;
	padding: 20px;
	border-radius: 16px;
	background: linear-gradient(160deg, var(--cws-navy) 0%, var(--cws-navy2) 100%);
	color: #fff;
	box-shadow: 0 16px 36px rgba(11, 37, 69, 0.24);
}

.cws-wqt-panel {
	display: none;
}

.cws-wqt-panel.is-active {
	display: block;
	animation: cws-wqt-fade 0.22s ease;
}

@keyframes cws-wqt-fade {
	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.cws-wqt-panel__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	margin-bottom: 13px;
	border-radius: 13px;
	background: rgba(46, 196, 182, 0.16);
	color: var(--cws-aqua);
}

.cws-wqt-panel__icon svg {
	width: 24px;
	height: 24px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.cws-wqt-panel__title {
	margin: 0 0 12px;
	font-size: 19px;
	color: #fff;
}

.cws-wqt-panel__stats {
	display: flex;
	gap: 24px;
	margin-bottom: 13px;
	padding-bottom: 13px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.cws-wqt-panel__stats span {
	display: block;
	margin-bottom: 3px;
	font-size: 9.5px;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
}

.cws-wqt-panel__stats b {
	font-size: 20px;
	font-weight: 600;
	color: #fff;
}

.cws-wqt-panel p {
	margin: 0;
	font-size: 13px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 880px) {
	.cws-wqt-tiles {
		flex-direction: column;
	}

	.cws-wqt-tiles__list {
		width: 100%;
	}

	.cws-wqt-tiles__panel {
		position: static;
		width: 100%;
		min-height: 0;
		flex: none;
	}
}

@media (max-width: 600px) {
	.cws-wqt-tiles__list {
		grid-template-columns: 1fr;
	}

	.cws-wqt-panel__title {
		font-size: 17px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cws-wqt-tile,
	.cws-wqt-panel.is-active {
		transition: none;
		animation: none;
	}
}

/* Panel moved inline beneath the tapped tile on narrow screens */
.cws-wqt-tiles__panel.is-inline {
	grid-column: 1 / -1;
	position: static;
	margin: 2px 0 4px;
	min-height: 0;
}
