/* Revert bootstrap changes */
button, input:not(#query), optgroup, select, textarea {
    margin: revert;
    font-family: revert;
    font-size: revert;
    line-height: revert;
}

/* ================== */
/* River Basin */
.plottable tr:nth-child(2) th:nth-child(2) {
	min-width: 4.5em;
}

/* Agency */
.plottable tr:nth-child(2) th:nth-child(3) {
	min-width: 5em;
	max-width: 5.5em;
}

.plottable tr:nth-child(3) th:nth-last-child(-n+6) {
	max-width: 4.5em;
}

#datadiv_actual, #plotdiv_actual {
	height: calc( 100% - 1.125em );
}

@media (max-width: 1063px) {
	/* Hide Prior Water Year column */
	.plottable tr:nth-child(3) th:nth-child(5),
	.plottable tr:nth-child(3) td:nth-child(5) {
		display: none;
		visibility: collapse;
	}
	.plottable th:nth-child(8),
	.plottable td:nth-child(8) {
		display: none;
		visibility: collapse;
	}
}

@media (min-width: 916px) {
	/* Restore column header names */
	.plottable tr:nth-child(3) th:nth-child(n):nth-child(-n+3) > div {
		visibility: visible;
		height: unset;
	}
	.plottable tr:nth-child(3) th:nth-child(n):nth-child(-n+3) > div::before {
		content: none;
	}

	.plottable tr:nth-child(3) th:nth-child(6) > div::before {
		content: "WY";
		display: block;
	}
}

@media (max-width: 915px) {
	/* Hide Current Water Year column */
	.plottable tr:nth-child(3) th:nth-child(4),
	.plottable tr:nth-child(3) td:nth-child(4) {
		display: none;
		visibility: collapse;
	}
	.plottable th:nth-child(7),
	.plottable td:nth-child(7) {
		display: none;
		visibility: collapse;
	}

	/* Hide the normal header content */
	.plottable tr:nth-child(3) th:nth-child(-n+3) > div {
		visibility: collapse!important;
		height: 1.5em!important;
	}

	/* Change "5 Days" to "5D" */
	.plottable tr:nth-child(3) th:nth-child(1) > div::before {
		visibility: visible!important;
		content: " 5D"!important;
	}

	/* Change "10 Days" to "10D" */
	.plottable tr:nth-child(3) th:nth-child(2) > div::before {
		visibility: visible!important;
		content: " 10D"!important;
	}

	/* Change "1 Month" to "1M" */
	.plottable tr:nth-child(3) th:nth-child(3) > div::before {
		visibility: visible!important;
		content: "1M"!important;
	}

	/* Remove "WY" text from last column header */
	.plottable tr:nth-child(3) th:nth-child(6) > div::before {
		content: none;
	}
}

@media (max-width: 822px) {
	#datadiv_actual, #plotdiv_actual {
		height: calc( 100% - 2.25em );
	}
}

@media (max-width: 480px) {
	/* Hide Agency column */
	.plottable tr:nth-child(2) th:nth-child(3),
	.plottable td:nth-child(3) {
		display: none;
		visibility: collapse;
	}
}

@media (max-width: 415px) {
	#datadiv_actual, #plotdiv_actual {
		height: calc( 100% - 3.5em );
	}
}

@media (max-width: 411px) {
	/* Hide River Basin column */
	.plottable tr:nth-child(2) th:nth-child(2),
	.plottable td:nth-child(2) {
		display: none;
		visibility: collapse;
	}
}
