/**
 * NT SNAP Waiver Map — front-end styles.
 *
 * Sections:
 *   1. Header-offset custom property (responsive).
 *   2. Accordion scroll-margin hooks.
 *   3. Map container.
 *   4. Legend.
 *   5. Tooltip.
 *
 * Author: New Target <https://www.newtarget.com/>
 */

/* -----------------------------------------------------------------
 * 1. Accordion deep-link scroll offset.
 *
 * Responsive custom property read by both native browser hash jumps
 * (via `scroll-margin-top`) and by `accordion.js` when
 * `window.ngaSnapWaiverHeaderOffset` is 0. Adjust the values below to
 * match the rendered height of the site header per breakpoint.
 * ----------------------------------------------------------------- */
:root {
	--nt-snap-header-offset: 295px;
}

@media (max-width: 1024px) {
	:root {
		--nt-snap-header-offset: 250px;
	}
}

@media (max-width: 700px) {
	:root {
		--nt-snap-header-offset: 260px;
	}
}

/* -----------------------------------------------------------------
 * 2. Accordion scroll-margin hooks.
 *
 * Applies the header offset to the accordion elements the browser may
 * jump to natively (without JS), as well as the `[data-nga-snap-target]`
 * marker that `accordion.js` tags its resolved item with.
 * ----------------------------------------------------------------- */
.uael-faq-accordion,
.uael-accordion-title,
.elementor-tab-title,
.elementor-toggle-title,
details.e-n-accordion-item,
[data-nt-snap-target] {
	scroll-margin-top: var(--nt-snap-header-offset, 295px);
}

/* -----------------------------------------------------------------
 * 3. Map container.
 * ----------------------------------------------------------------- */

 .highcharts-title {
	margin-bottom: 40px;
	font-family: 'rokkitt', serif;
	font-size: 40px;
	font-weight: 500;
	line-height: 42px;
 }

.snap-waiver-map {
	margin: 0 0 2rem;
	max-width: 100%;
}

.snap-waiver-map__chart {
	width: 100%;
	min-height: 480px;
	box-sizing: border-box;
}

@media (max-width: 1024px) {
	.highcharts-title {
		margin-bottom: 40px;
		font-size: 35;
		line-height: 37;
	 }
	.snap-waiver-map__chart {
		min-height: 440px;
	}
}

@media (max-width: 700px) {
	.highcharts-title {
		margin-bottom: 40px;
		font-size: 30;
		line-height: 32;
	 }
	.snap-waiver-map__chart {
		min-height: 360px;
	}
}

.snap-waiver-map__error {
	padding: 1rem;
	text-align: center;
	color: #7a1020;
	background: #fdecef;
	border: 1px solid #f6c7d0;
	border-radius: 4px;
}

/* -----------------------------------------------------------------
 * 4. Legend.
 * ----------------------------------------------------------------- */
.snap-waiver-legend {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem 1.5rem;
	list-style: none;
	margin: 1rem 0 0;
	padding: 0;
	font-size: 0.9375rem;
}

.snap-waiver-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.snap-waiver-legend__swatch {
	display: inline-block;
	width: 16px;
	height: 16px;
	border-radius: 3px;
	border: 1px solid rgba(0, 0, 0, 0.1);
	flex: 0 0 auto;
}

.snap-waiver-legend__label {
	color: #002657;
	font-weight: 500;
}

/* -----------------------------------------------------------------
 * 5. Tooltip.
 *
 * Widths are declared explicitly on the tooltip so the content wraps
 * on long descriptions and sits nicely on small screens.
 * ----------------------------------------------------------------- */
.snap-tip {
	box-sizing: border-box;
	width: min(280px, calc(100vw - 24px));
	min-width: 220px;
	max-width: min(280px, calc(100vw - 24px));
	padding: 0.75rem 0.875rem;
	font-family: inherit;
	color: #1a1a1a;
	line-height: 1.4;
	white-space: normal !important;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.snap-tip__title {
	font-size: 1rem;
	font-weight: 700;
	color: #002657;
	margin-bottom: 0.35rem;
}

.snap-tip__row {
	font-size: 0.8125rem;
	color: #333;
	margin-bottom: 0.35rem;
}

.snap-tip__row strong {
	color: #002657;
}

.snap-tip__short {
	display: block !important;
	min-width: 0;
	max-width: 100%;
	font-size: 0.8125rem;
	color: #444;
	margin-bottom: 0.6rem;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.snap-tip__short p {
	margin: 0 0 0.35rem;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
	font-size: 16px;
}

.snap-tip__short p:last-child {
	margin-bottom: 0;
}

.snap-tip__body {
	display: block !important;
	min-width: 0;
	max-width: 100%;
	max-height: 200px;
	overflow-y: auto;
	font-size: 0.8125rem;
	color: #444;
	margin-bottom: 0.6rem;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.snap-tip__body p {
	margin: 0 0 0.35rem;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.snap-tip__body p:last-child {
	margin-bottom: 0;
}

.snap-tip__link {
	display: inline-block;
	margin-top: 0.25rem;
	padding: 0.35rem 0.75rem;
	font-size: 0.8125rem;
	font-weight: 600;
	color: #ffffff !important;
	background-color: #F61A58;
	border-radius: 32px;
	text-decoration: none;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.snap-tip__link:hover,
.snap-tip__link:focus {
	background-color: #062367;
	color: #ffffff !important;
	text-decoration: none;
}

.snap-tip__link:after {
	content: "";
	display: inline-block;
	width: 18px;
	height: 18px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath stroke='%23fff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6H7M7 4l3 2-3 2'/%3E%3C/svg%3E");	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	margin-left: 4px;
	transition: all 0.3s ease;
}

.snap-tip__link:hover:after,
.snap-tip__link:focus:after {
	margin-left: 8px;
}

/* Ensure Highcharts' HTML tooltip wrappers honor the tooltip width. */
.highcharts-tooltip,
.highcharts-tooltip-box,
.highcharts-label-box,
.highcharts-tooltip > span {
	white-space: normal !important;
	width: min(280px, calc(100vw - 24px)) !important;
	min-width: 220px !important;
	max-width: min(280px, calc(100vw - 24px)) !important;
	box-sizing: border-box;
}

.highcharts-tooltip > span {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	pointer-events: auto;
}

.highcharts-tooltip-container {
	z-index: 9999 !important;
}
