/* Historic State Tax Rate Explorer — styles. All scoped under .tax-map. */

.tax-map
{
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	padding: 16px 0;
	color: #1f2328;
	max-width: 100%;
	box-sizing: border-box;
}

.tax-map *,
.tax-map *::before,
.tax-map *::after
{
	box-sizing: border-box;
}

.tax-map--hidden
{
	display: none !important;
}

.tax-map__map-title
{
	font-size: 1rem;
	font-weight: 600;
	text-align: center;
	margin: 4px 0 0;
}

.tax-map__title
{
    font-family: 'Roboto Condensed', 'Roboto', sans-serif;
    letter-spacing: -0.01em;
	margin:0;
}

.tax-map__subtitle
{
	color: #656d76;
	line-height: 1.4;
	text-align: left;
	max-width: 740px;
	margin: 0;
}

/* Cards */
.tax-map__card
{
	background: #f6f8fa;
	border: 1px solid #d0d7de;
	border-radius: 8px;
	padding: 12px 16px;
	max-width: 820px;
	width: 100%;
}

.tax-map__step-head
{
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}

.tax-map__step-label
{
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #656d76;
	margin-bottom: 4px;
}

/* Inside the step head the label sits in the middle and shouldn't keep its
   bottom margin. */
.tax-map__step-head .tax-map__step-label
{
	flex: 1 1 auto;
	text-align: center;
	margin-bottom: 0;
}

.tax-map__nav-btn
{
	flex: 0 0 auto;
	background: none;
	border: 1px solid #d0d7de;
	border-radius: 6px;
	padding: 4px 10px;
	font-size: .74rem;
	font-weight: 600;
	color: #424a53;
	cursor: pointer;
	white-space: nowrap;
}

.tax-map__nav-btn:hover
{
	background: #eaeef2;
}

.tax-map__step-actions
{
	display: flex;
	justify-content: flex-end;
	margin-top: 12px;
}

.tax-map__next-btn
{
	background: #122b4e;
	border: 1px solid #122b4e;
	border-radius: 6px;
	padding: 7px 14px;
	font-size: .8rem;
	font-weight: 600;
	color: #fff;
	cursor: pointer;
}

.tax-map__next-btn:hover
{
	background: #1c3a63;
}

.tax-map__prompt
{
	font-size: .88rem;
	font-weight: 600;
	margin-bottom: 10px;
}

/* Mode buttons */
.tax-map__modes
{
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.tax-map__mode-btn
{
	display: block;
	border: 1.5px solid #d0d7de;
	border-radius: 6px;
	padding: 10px 18px;
	background: #fff;
	cursor: pointer;
	font: inherit;
	font-size: .85rem;
	font-weight: 500;
	color: #1f2328;
	text-align: left;
	line-height: 1.35;
	transition: border-color .12s, background .12s;
}

.tax-map__mode-btn:hover
{
	border-color: #122b4e;
	background: #f6f8fa;
}

.tax-map__mode-btn.is-selected
{
	border-color: #122b4e;
	background: hsl(215, 62.8%, 90%);
	color: #122b4e;
	font-weight: 600;
}

.tax-map__mode-sub
{
	display: block;
	font-size: .74rem;
	color: #656d76;
	font-weight: 400;
}

.tax-map__mode-btn.is-selected .tax-map__mode-sub
{
	color: #122b4e;
}

/* Tax rows */
.tax-map__tax-list
{
	margin-bottom: 12px;
}

.tax-map__tax-row
{
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 0;
	border-bottom: 1px solid #f0f0f0;
}

.tax-map__tax-row:last-child
{
	border-bottom: none;
}

.tax-map__tax-name
{
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .84rem;
	font-weight: 500;
	min-width: 170px;
	cursor: pointer;
}

.tax-map__tax-name input
{
	accent-color: #122b4e;
	width: 15px;
	height: 15px;
}

/* Direction buttons */
.tax-map__dir-btns
{
	display: flex;
	gap: 4px;
}

.tax-map__dir-btn
{
	border: 1px solid #d0d7de;
	border-radius: 4px;
	padding: 3px 12px;
	font: inherit;
	font-size: .78rem;
	background: #fff;
	cursor: pointer;
	color: #122b4e;
	transition: all .1s;
}

.tax-map__dir-btn:hover
{
	border-color: #122b4e;
}

.tax-map__dir-btn.is-inc,
.tax-map__dir-btn.is-nc,
.tax-map__dir-btn.is-dec
{
	border-color: #122b4e;
	background: hsl(215, 62.8%, 90%);
	color: #122b4e;
	font-weight: 600;
}

/* Rate toggle */
.tax-map__rate-toggle
{
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
}

.tax-map__rate-btn
{
	border: 1px solid #d0d7de;
	border-radius: 4px;
	padding: 4px 14px;
	font: inherit;
	font-size: .8rem;
	background: #fff;
	cursor: pointer;
	color: #1f2328;
	transition: all .1s;
}

.tax-map__rate-btn.is-selected
{
	border-color: #122b4e;
	background: hsl(215, 62.8%, 90%);
	color: #122b4e;
	font-weight: 600;
}

.tax-map__rate-btn:disabled
{
	opacity: .4;
	cursor: not-allowed;
	border-color: #d0d7de;
	background: #f6f8fa;
	color: #656d76;
}

/* Year controls */
.tax-map__ctrl-label
{
	font-size: .82rem;
	color: #656d76;
	font-weight: 500;
	margin-bottom: 2px;
}

.tax-map__years
{
	display: flex;
	gap: 12px;
	align-items: flex-end;
	flex-wrap: wrap;
}

.tax-map__select
{
	font-size: .82rem;
	width: 90px;
	padding: 4px;
}

.tax-map__year-error
{
	font-size: .78rem;
	color: #cf222e;
	font-weight: 500;
	margin-bottom: 6px;
}

/* Map */
.tax-map__map-wrap
{
	position: relative;
	max-width: 960px;
	width: 100%;
}

.tax-map__svg
{
	width: 100%;
	height: auto;
	display: block;
}

.tax-map__state
{
	stroke: #fff;
	stroke-width: 1.6;
	cursor: pointer;
	transition: fill .15s;
}

/* Tooltip */
.tax-map__tooltip
{
	position: absolute;
	background: #fff;
	border: 1px solid #d0d7de;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: .76rem;
	pointer-events: none;
	opacity: 0;
	transition: opacity .1s;
	white-space: nowrap;
	z-index: 10;
	min-width: 220px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

.tax-map__t-state
{
	font-size: .88rem;
	font-weight: 600;
	margin-bottom: 6px;
}

.tax-map__t-row
{
	display: flex;
	justify-content: space-between;
	gap: 14px;
	color: #656d76;
	line-height: 1.7;
}

.tax-map__t-val
{
	font-weight: 600;
	color: #1f2328;
}

.tax-map__t-hr
{
	margin: 5px 0;
	border: none;
	border-top: 1px solid #d0d7de;
}

.tax-map__t-match
{
	font-size: .82rem;
	font-weight: 700;
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px solid #d0d7de;
}

.tax-map__t-match.is-yes
{
	color: #1a7f37;
}

.tax-map__t-match.is-no
{
	color: #cf222e;
}

/* Legends */
.tax-map__legend
{
	display: flex;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
	justify-content: center;
}

.tax-map__legend-item
{
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: .78rem;
	color: #656d76;
}

.tax-map__swatch
{
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 2px;
}

.tax-map__match-count
{
	font-size: .78rem;
	color: #656d76;
}

.tax-map__grad-legend
{
	max-width: 960px;
	width: 100%;
	padding: 0 4px;
}

.tax-map__grad-bar
{
	height: 14px;
	border-radius: 3px;
	background: linear-gradient(to right, #e8b827, #d0d7de, #1a4e8a);
}

.tax-map__grad-bar--level
{
    background: linear-gradient(to right, #d0d7de, #122b4e);
}

.tax-map__grad-labels
{
	display: flex;
	justify-content: space-between;
	margin-top: 4px;
	font-size: .72rem;
	color: #656d76;
}

.tax-map__error
{
	margin: 8px;
	padding: 8px 12px;
	border: 1px solid #cf222e;
	border-radius: 6px;
	color: #cf222e;
	font-size: .82rem;
}