/**
 * Traveler Resources widget (homepage resource section).
 *
 * Ported from the Advantis_Traveler_Resources.html design. Fully scoped under
 * .amed-tr. Eyebrows and the gateway CTA use weight 700 (design had 800).
 * Explicit link/button/heading resets because Astra styles those globally.
 *
 * @package Advantis
 */

.amed-tr {
	--tr-navy: #132c44;
	--tr-ink: #101e2d;
	--tr-slate: #526477;
	width: 100%;
	color: var(--tr-ink);
	font-family: inherit;
	-webkit-font-smoothing: antialiased;
}

.amed-tr,
.amed-tr * {
	box-sizing: border-box;
}

.amed-tr [hidden] {
	display: none !important;
}

.amed-tr a {
	text-decoration: none;
	touch-action: manipulation;
}

.amed-tr a:focus-visible,
.amed-tr button:focus-visible {
	outline: 3px solid #b96500;
	outline-offset: 3px;
}

.amed-tr h2,
.amed-tr h3 {
	font-family: inherit;
	font-weight: 700;
	text-transform: none;
	padding: 0;
}

.amed-tr .tr-eyebrow {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.35px;
	line-height: 1.4;
	text-transform: uppercase;
}

/* ---- Intro ---- */

.amed-tr .tr-intro {
	text-align: center;
	max-width: 1040px;
	margin: 0 auto 34px;
}

.amed-tr .tr-intro > .tr-eyebrow {
	color: #0879af;
	font-size: 13px;
	letter-spacing: 1px;
}

.amed-tr .tr-intro h2 {
	font-size: clamp(1.75rem, 3vw, 2.65rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
	margin: 10px 0 12px;
	color: var(--tr-ink);
	text-wrap: balance;
}

.amed-tr .tr-intro p {
	font-size: 1.02rem;
	line-height: 1.65;
	color: var(--tr-slate);
	margin: 0;
}

/* ---- Compact-screen category toggle ---- */

.amed-tr .tr-switcher {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 5px;
	background: #edf4f8;
	border: 1px solid #dce7ed;
	border-radius: 12px;
	padding: 5px;
	margin: 0 0 14px;
}

.amed-tr .tr-switcher button,
.amed-tr .tr-switcher button:hover,
.amed-tr .tr-switcher button:focus {
	min-width: 0;
	min-height: 46px;
	margin: 0;
	border: 1px solid transparent;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: #324b60;
	font-family: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	padding: 10px 7px;
}

.amed-tr .tr-switcher button[aria-pressed="true"] {
	background: var(--tr-navy);
	color: #fff;
	border-color: var(--tr-navy);
}

/* ---- Salary cards ---- */

.amed-tr .tr-salary-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 20px;
}

.amed-tr .tr-salary-grid.tr-cols-2 {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.amed-tr .tr-salary-grid.tr-cols-1 {
	grid-template-columns: minmax(0, 1fr);
}

.amed-tr .tr-salary-card {
	min-width: 0;
	border: 1px solid #234660;
	border-radius: 17px;
	padding: 23px 22px 19px;
	background: linear-gradient(140deg, #132c44, #103b57);
	color: #fff;
	box-shadow: 0 8px 20px #1334490c;
	display: flex;
	flex-direction: column;
}

.amed-tr .tr-card-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 7px 10px;
}

.amed-tr .tr-card-top .tr-eyebrow {
	color: #83d3ed;
	letter-spacing: 1.15px;
}

.amed-tr .tr-signal {
	color: #c1dce8;
	font-size: 12px;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 5px;
}

.amed-tr .tr-signal i {
	width: 5px;
	height: 5px;
	border-radius: 100%;
	background: #57d6ba;
	box-shadow: 0 0 0 3px #57d6ba15;
}

.amed-tr .tr-salary-card h3 {
	font-size: 30px;
	line-height: 1.15;
	letter-spacing: -0.7px;
	margin: 16px 0 10px;
	color: #fff;
}

.amed-tr .tr-prompt {
	display: block;
	margin: 0 0 8px;
	font-size: 12px;
	line-height: 1.5;
	color: #c5dae7;
	font-weight: 400;
}

/* adv-select, dark skin. The native select is the pre-JS fallback. */
.amed-tr .tr-select {
	position: relative;
}

.amed-tr .tr-select::after {
	content: "";
	position: absolute;
	right: 14px;
	top: 22px;
	width: 8px;
	height: 8px;
	border-right: 2px solid #9fd8ee;
	border-bottom: 2px solid #9fd8ee;
	transform: translateY(-70%) rotate(45deg);
	pointer-events: none;
	transition: transform 0.15s;
}

.amed-tr .tr-select:has(.advs-trigger.is-open)::after,
.amed-tr .tr-select:has(.advs-trigger[aria-expanded="true"])::after {
	transform: translateY(-20%) rotate(-135deg);
}

.amed-tr .tr-select select,
.amed-tr .tr-select .advs-trigger,
.amed-tr .tr-select .advs-trigger:hover,
.amed-tr .tr-select .advs-trigger:focus {
	width: 100%;
	height: 44px;
	margin: 0;
	appearance: none;
	-webkit-appearance: none;
	background: #ffffff0c;
	background-image: none;
	border: 1px solid #7291a050;
	border-radius: 7px;
	box-shadow: none;
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 42px;
	text-transform: none;
	text-align: left;
	padding: 0 36px 0 12px;
	cursor: pointer;
	color-scheme: dark;
}

.amed-tr .tr-select select option {
	background: #16374f;
}

.amed-tr .tr-select .advs-trigger:hover {
	border-color: #9fd8ee80;
	background: #ffffff14;
}

.amed-tr .tr-select .advs-trigger:focus-visible,
.amed-tr .tr-select .advs-trigger[aria-expanded="true"] {
	outline: none;
	border-color: #49c7ed;
	background: #ffffff14;
}

/* Open panel: a lifted layer of the card's own navy, not a white sheet. */
.amed-tr .tr-select .advs-panel {
	width: 100%;
	max-width: none;
	background: linear-gradient(180deg, #1b4361, #173a55);
	border: 1px solid #49c7ed40;
	border-radius: 10px;
	box-shadow: 0 18px 40px -8px rgba(4, 16, 28, 0.62), 0 4px 10px rgba(4, 16, 28, 0.3);
	color-scheme: dark;
}

.amed-tr .tr-select .advs-list {
	padding: 5px;
	scrollbar-width: thin;
	scrollbar-color: #49c7ed66 transparent;
}

.amed-tr .tr-select .advs-opt {
	min-height: 40px;
	padding: 9px 11px;
	border-radius: 7px;
	color: #d8ecf5;
	font-size: 15px;
	font-weight: 500;
	transition: background-color 0.12s ease-out, color 0.12s ease-out;
}

.amed-tr .tr-select .advs-opt + .advs-opt {
	margin-top: 2px;
}

.amed-tr .tr-select .advs-opt.is-active {
	background: #49c7ed1f;
	color: #fff;
}

.amed-tr .tr-select .advs-opt.is-selected {
	color: #83d3ed;
	font-weight: 700;
}

.amed-tr .tr-select .advs-opt.is-selected.is-active {
	background: #49c7ed29;
}

.amed-tr .tr-select .advs-opt svg {
	color: #83d3ed;
}

.amed-tr .tr-readout {
	margin: 22px 0;
}

.amed-tr .tr-metric-label {
	font-size: 13px;
	line-height: 1.5;
	color: #c5dae7;
	min-height: 39px;
}

.amed-tr .tr-metric {
	display: flex;
	align-items: baseline;
	gap: 7px;
	margin: 7px 0 19px;
}

.amed-tr .tr-metric > span {
	font-size: 44px;
	font-weight: 800;
	letter-spacing: -1.7px;
	line-height: 1;
	font-variant-numeric: tabular-nums;
}

.amed-tr .tr-metric small {
	font-size: 14px;
	color: #bdd7e4;
}

.amed-tr .tr-range-label {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 8px;
	font-size: 12px;
	color: #b8d1df;
}

.amed-tr .tr-range-label span {
	color: #eaf9ff;
	font-variant-numeric: tabular-nums;
}

.amed-tr .tr-range-track {
	position: relative;
	height: 5px;
	margin: 12px 0 14px;
	border-radius: 6px;
	background: linear-gradient(90deg, #274e69, #43bee8);
}

.amed-tr .tr-range-track > span {
	position: absolute;
	top: -4px;
	width: 13px;
	height: 13px;
	border-radius: 100%;
	background: #fff;
	box-shadow: 0 0 0 3px #43bee833;
	transform: translateX(-50%);
	transition: left 0.35s ease;
}

.amed-tr .tr-inventory {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 4px 8px;
	color: #adc7d6;
	font-size: 12px;
	line-height: 1.5;
}

.amed-tr .tr-inventory b {
	color: #e5f5fc;
}

.amed-tr .tr-report-link,
.amed-tr .tr-report-link:visited {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 10px;
	min-height: 48px;
	margin-top: auto;
	padding: 13px 15px;
	border-radius: 24px;
	background: #fff;
	color: var(--tr-navy);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
}

.amed-tr .tr-report-link:hover,
.amed-tr .tr-report-link:focus {
	background: #e5f7ff;
	color: var(--tr-navy);
}

.amed-tr .tr-report-label {
	min-width: 0;
}

.amed-tr .tr-report-link > span:last-child {
	font-size: 18px;
	line-height: 12px;
}

/* ---- Planning cards (license + housing) ---- */

.amed-tr .tr-planning-grid {
	margin-top: 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.amed-tr .tr-planning-card {
	position: relative;
	min-width: 0;
	min-height: 240px;
	padding: 25px;
	border-radius: 17px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.amed-tr .tr-planning-card .tr-eyebrow {
	color: #12698f;
}

.amed-tr .tr-planning-card h3 {
	font-size: 30px;
	line-height: 1.15;
	letter-spacing: -0.7px;
	margin: 13px 0 11px;
	color: var(--tr-ink);
}

.amed-tr .tr-planning-card p {
	font-size: 15px;
	line-height: 1.65;
	color: #506b7d;
	margin: 0 0 20px;
	max-width: 285px;
}

.amed-tr .tr-copy {
	position: relative;
	z-index: 1;
}

.amed-tr .tr-license-card {
	background: #edf7fc;
	border: 1px solid #d5eaf5;
}

.amed-tr .tr-license-card .tr-copy {
	max-width: 69%;
}

.amed-tr .tr-map-art {
	position: absolute;
	width: 260px;
	right: -40px;
	top: 15px;
	opacity: 0.33;
	transform: rotate(-9deg);
	pointer-events: none;
}

.amed-tr .tr-usmap {
	display: block;
	width: 100%;
	height: auto;
}

.amed-tr .tr-usmap path {
	fill: #6bbce1;
	stroke: #edf7fc;
	stroke-width: 3;
}

.amed-tr .tr-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: auto;
	position: relative;
	z-index: 2;
}

.amed-tr .tr-links a,
.amed-tr .tr-links a:visited {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	padding: 11px 15px;
	border-radius: 22px;
	background: #fff;
	border: 1px solid #d6e7ef;
	color: #164461;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.amed-tr .tr-links a:hover,
.amed-tr .tr-links a:focus {
	background: #dff4fe;
	border-color: #8accdf;
	color: #164461;
}

.amed-tr .tr-housing-card {
	background: #f3f0ea;
	border: 1px solid #e7e1d6;
	padding-right: 42%;
}

.amed-tr .tr-housing-card::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	right: 36%;
	width: 9%;
	background: linear-gradient(90deg, #f3f0ea, transparent);
}

.amed-tr .tr-housing-img {
	position: absolute;
	right: 0;
	top: 0;
	width: 40%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: 45% center;
}

.amed-tr .tr-housing-card h3 {
	max-width: 250px;
}

.amed-tr .tr-housing-card.tr-no-img {
	padding-right: 25px;
}

.amed-tr .tr-housing-card.tr-no-img::after {
	display: none;
}

.amed-tr .tr-housing-card .tr-eyebrow {
	color: #627257;
}

.amed-tr .tr-housing-card p {
	color: #626c67;
}

.amed-tr .tr-housing-card .tr-links a {
	gap: 5px;
	padding: 10px 12px;
}

/* ---- All-resources gateway ---- */

.amed-tr .tr-gateway,
.amed-tr .tr-gateway:visited {
	margin-top: 22px;
	border: 1px solid #cce7f3;
	border-radius: 15px;
	background: linear-gradient(100deg, #eff9fd, #f8fcfe);
	padding: 23px 27px;
	display: flex;
	align-items: center;
	gap: 25px;
	color: var(--tr-ink);
	transition: background 0.2s, border-color 0.2s;
}

.amed-tr .tr-gateway:hover,
.amed-tr .tr-gateway:focus {
	background: #e3f5fd;
	border-color: #89cce8;
	color: var(--tr-ink);
}

.amed-tr .tr-count {
	font-size: 48px;
	letter-spacing: -2px;
	font-weight: 800;
	color: #0879af;
	line-height: 1;
}

.amed-tr .tr-gateway-copy {
	flex: 1;
	min-width: 0;
}

.amed-tr .tr-gateway-h {
	display: block;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.25;
	letter-spacing: -0.4px;
	margin: 0 0 7px;
}

.amed-tr .tr-gateway-p {
	display: block;
	font-size: 14px;
	line-height: 1.5;
	color: var(--tr-slate);
}

.amed-tr .tr-gateway-cta {
	color: #076b96;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	display: flex;
	gap: 20px;
	align-items: center;
}

.amed-tr .tr-gateway-cta span {
	font-size: 27px;
	font-weight: 400;
}

/* ---- Motion ---- */

@media (min-width: 1000px) {
	.amed-tr .tr-salary-card {
		animation: amed-tr-arrive 0.5s ease both;
	}

	.amed-tr .tr-salary-card:nth-child(2) {
		animation-delay: 0.07s;
	}

	.amed-tr .tr-salary-card:nth-child(3) {
		animation-delay: 0.14s;
	}
}

@keyframes amed-tr-arrive {
	from {
		opacity: 0;
		transform: translateY(8px);
	}

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

/* ---- Responsive ---- */

@media (max-width: 1100px) {
	.amed-tr .tr-planning-grid {
		grid-template-columns: 1fr;
	}

	.amed-tr .tr-license-card .tr-copy {
		max-width: 72%;
	}

	.amed-tr .tr-planning-card p {
		max-width: 480px;
	}

	.amed-tr .tr-housing-card {
		padding-right: 38%;
	}

	.amed-tr .tr-housing-img {
		width: 34%;
	}

	.amed-tr .tr-housing-card::after {
		right: 30%;
	}
}

@media (max-width: 1000px) {
	.amed-tr .tr-salary-card {
		padding: 20px 16px;
	}

	.amed-tr .tr-card-top {
		display: block;
	}

	.amed-tr .tr-signal {
		margin-top: 7px;
	}

	.amed-tr .tr-planning-card {
		padding-left: 20px;
	}

	.amed-tr .tr-gateway {
		gap: 18px;
	}

	.amed-tr .tr-gateway-cta {
		font-size: 12px;
		gap: 8px;
	}
}

@media (max-width: 900px) {
	.amed-tr .tr-salary-grid,
	.amed-tr .tr-salary-grid.tr-cols-2 {
		grid-template-columns: minmax(0, 1fr);
	}

	.amed-tr .tr-salary-card {
		padding: 22px;
	}

	.amed-tr .tr-salary-card h3 {
		margin: 14px 0 10px;
	}

	.amed-tr .tr-metric-label {
		min-height: 0;
	}

	.amed-tr .tr-card-top {
		display: flex;
	}

	.amed-tr .tr-signal {
		margin: 0;
	}

	.amed-tr .tr-gateway,
	.amed-tr .tr-gateway:visited {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		gap: 14px 20px;
		padding: 22px;
	}

	.amed-tr .tr-gateway-cta {
		grid-column: 1 / -1;
		white-space: normal;
		justify-content: space-between;
		border-top: 1px solid #cce7f3;
		padding-top: 14px;
		min-height: 44px;
		font-size: 14px;
	}
}

@media (max-width: 600px) {
	.amed-tr .tr-intro {
		margin-bottom: 22px;
	}

	.amed-tr .tr-intro p {
		font-size: 16px;
		line-height: 1.6;
	}

	.amed-tr .tr-salary-card {
		padding: 20px;
	}

	.amed-tr .tr-planning-card {
		padding: 22px;
		min-height: 0;
	}

	.amed-tr .tr-planning-card h3 {
		font-size: 24px;
		max-width: none;
	}

	.amed-tr .tr-license-card .tr-copy {
		max-width: 100%;
	}

	.amed-tr .tr-map-art,
	.amed-tr .tr-housing-img,
	.amed-tr .tr-housing-card::after {
		display: none;
	}

	.amed-tr .tr-planning-card p {
		max-width: none;
		margin-bottom: 18px;
	}

	.amed-tr .tr-gateway,
	.amed-tr .tr-gateway:visited {
		padding: 20px;
		gap: 12px 16px;
	}

	.amed-tr .tr-count {
		font-size: 40px;
	}

	.amed-tr .tr-gateway-h {
		font-size: 18px;
		line-height: 1.3;
	}
}

@media (prefers-reduced-motion: reduce) {
	.amed-tr *,
	.amed-tr *::before,
	.amed-tr *::after {
		animation: none !important;
		transition: none !important;
	}
}
