/* OE – SLMM US State Tile Map (v1.4.0)
 * Ported verbatim from oe-slmm-landing.html ("tile map" rules + the hero's
 * legend/readout/toggle rules), in the same order, scoped under the block.
 * Page tokens (--oe-slmm-*) are copied from the prototype's :root and scoped
 * here; the three tile colours come from the block's settings (index.php).
 * Assumes a navy section (light text), as in the prototype hero.
 */
.oe-block-slmm-us-state-tile-map {
	--oe-slmm-on-dark: color-mix(in srgb, var(--oe-color-primary-4, #ffffff) 80%, transparent);
	--oe-slmm-on-dark-soft: color-mix(in srgb, var(--oe-color-primary-4, #ffffff) 62%, transparent);
	--oe-slmm-rule-dark: color-mix(in srgb, var(--oe-color-primary-4, #ffffff) 14%, transparent);
	width: 100%;
	max-width: var(--oe-sutm-max, none);
	margin-inline: auto;
	/* v1.2.0: key, readout and caption line up on the left even when the
	   section around the block centres its text (user request). */
	text-align: start;
}
@media (max-width: 767.98px) {
	.oe-block-slmm-us-state-tile-map { max-width: var(--oe-sutm-max-phone, none); }
}
.oe-block-slmm-us-state-tile-map :is(figure, figcaption, p) { margin: 0; }
/* v1.0.1: no frame around the map. The site draws a dotted line round
   figures/SVGs that the prototype doesn't have (user request). */
.oe-block-slmm-us-state-tile-map,
.oe-block-slmm-us-state-tile-map .oe-slmm-map,
.oe-block-slmm-us-state-tile-map .oe-slmm-map svg { border: 0; outline: 0; box-shadow: none; padding: 0; }

/* v1.3.0: editor-only note when the SLMM data file can't be read (visitors see nothing). */
.oe-block-slmm-us-state-tile-map .oe-slmm-map-nodata { margin: 0; padding: var(--oe-spacing-base); border: 1px dashed currentColor; font-size: var(--oe-font-size-small); }

/* tile map */
.oe-block-slmm-us-state-tile-map .oe-slmm-map { position: relative; }
.oe-block-slmm-us-state-tile-map .oe-slmm-map svg { display: block; width: 100%; height: auto; overflow: visible; }
.oe-block-slmm-us-state-tile-map .oe-slmm-tile rect { transition: fill .5s ease, opacity .5s ease; }
.oe-block-slmm-us-state-tile-map .oe-slmm-tile text { font-family: 'Poppins', Arial, sans-serif; font-size: 11px; font-weight: 500; fill: var(--oe-color-primary-4, #ffffff); text-anchor: middle; pointer-events: none; }
.oe-block-slmm-us-state-tile-map .oe-slmm-tile.is-low text { fill: var(--oe-slmm-on-dark-soft); }
.oe-block-slmm-us-state-tile-map .oe-slmm-tile:hover rect { stroke: var(--oe-color-primary-4, #ffffff); stroke-width: 2; }
/* v1.4.0: tiles are clickable; the selected state keeps a thicker white outline. */
.oe-block-slmm-us-state-tile-map .oe-slmm-tile { cursor: pointer; }
.oe-block-slmm-us-state-tile-map .oe-slmm-tile.is-selected rect { stroke: var(--oe-color-primary-4, #ffffff); stroke-width: 3; }
.oe-block-slmm-us-state-tile-map .oe-slmm-tile:focus { outline: none; }
.oe-block-slmm-us-state-tile-map .oe-slmm-tile:focus-visible { outline: 3px solid var(--oe-color-primary, #00addc); outline-offset: 3px; border-radius: 4px; }
.oe-block-slmm-us-state-tile-map .oe-slmm-map-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--oe-spacing-base); margin-top: var(--oe-spacing-medium); padding-top: var(--oe-spacing-base); border-top: 1px solid var(--oe-slmm-rule-dark); }
.oe-block-slmm-us-state-tile-map .oe-slmm-readout b { display: block; font-size: var(--oe-font-size-xlarge); font-weight: 700; line-height: 1; }
.oe-block-slmm-us-state-tile-map .oe-slmm-readout span { font-size: var(--oe-font-size-small); color: var(--oe-color-secondary-9-300, #63e1fd); }
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle { display: inline-flex; gap: var(--oe-spacing-2xsmall); padding: var(--oe-spacing-2xsmall); border-radius: var(--oe-border-radius-base); background: var(--oe-color-secondary-light-20, #335c87); }
/* Two classes + :hover/:focus so the theme's button hover/focus fill doesn't win (guide trap). */
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle button,
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle button:hover,
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle button:focus { font: inherit; font-size: var(--oe-font-size-small); font-weight: 400; line-height: 1.5; color: var(--oe-color-primary-4, #ffffff); background: transparent; border: 0; border-radius: var(--oe-border-radius-small); padding: 8px 14px; cursor: pointer; text-transform: none; letter-spacing: normal; min-height: 0; box-shadow: none; }
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle button[aria-pressed="true"],
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle button[aria-pressed="true"]:hover,
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle button[aria-pressed="true"]:focus { background: var(--oe-color-primary-4, #ffffff); color: var(--oe-color-secondary, #003469); font-weight: 500; }
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle button:focus:not(:focus-visible) { outline: none; }
.oe-block-slmm-us-state-tile-map .oe-slmm-toggle button:focus-visible { outline: 3px solid var(--oe-color-primary, #00addc); outline-offset: 3px; }
.oe-block-slmm-us-state-tile-map .oe-slmm-legend { display: flex; flex-wrap: wrap; gap: var(--oe-spacing-base); margin-top: var(--oe-spacing-small); font-size: var(--oe-font-size-xsmall); color: var(--oe-slmm-on-dark); }
.oe-block-slmm-us-state-tile-map .oe-slmm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.oe-block-slmm-us-state-tile-map .oe-slmm-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }

/* Tiles stay hidden until script.js starts the one-by-one fade (prototype:
   opacity 0, then 1 at 120ms + 14ms per tile). If the script never runs,
   they show after 2s anyway. */
.oe-block-slmm-us-state-tile-map.is-wait .oe-slmm-tile rect { opacity: 0; animation: oe-sutm-show 0s 2s forwards; }
@keyframes oe-sutm-show { to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
	.oe-block-slmm-us-state-tile-map *,
	.oe-block-slmm-us-state-tile-map *::before,
	.oe-block-slmm-us-state-tile-map *::after { transition: none !important; }
}
