/* States: a 3D tile map of the U.S. (built by assets/js/states.js) and the panel of the chosen state */
.pf-states-map { padding-top: clamp(60px, 7vw, 100px); }
.pf-states-map .pf-states-map__grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 40px; align-items: center; max-width: none; }
.pf-states-map .pf-states { display: grid; gap: 24px; margin: 0; }
.pf-states-map .pf-state { position: relative; overflow: hidden; margin: 0; border-radius: 24px; padding: 34px; background: var(--wp--preset--color--base); box-shadow: var(--wp--custom--shadow); }
.pf-states-map .pf-state > * { position: relative; margin: 0; }
.pf-states-map .pf-state__code { position: absolute; right: -10px; top: -24px; font-size: 9rem; font-variation-settings: "wdth" 125; font-weight: 900; letter-spacing: -0.06em; color: transparent; -webkit-text-stroke: 1.5px rgba(26, 60, 143, 0.14); line-height: 1; pointer-events: none; }
.pf-states-map .pf-state__title { font-size: clamp(2rem, 3.4vw, 3rem); font-variation-settings: "wdth" 118; font-weight: 850; letter-spacing: -0.04em; line-height: 1; }
.pf-states-map .pf-state__text { margin-top: 12px; color: var(--wp--preset--color--muted); }
.pf-states-map .pf-state__list { margin-top: 20px; display: grid; gap: 10px; font-weight: 600; }
.pf-states-map .pf-state__list li::before { color: var(--wp--preset--color--success); }
.pf-states-map .pf-state__cta { margin-top: 24px; }
.pf-states-map.is-enhanced .pf-state[hidden] { display: none; }
.pf-states-map.is-enhanced .pf-state.enter > :not(.pf-state__code) { animation: pf-st-in 0.8s var(--wp--custom--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes pf-st-in { from { opacity: 0; transform: translateY(20px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
.pf-states-map .pf-map-stage { perspective: 1600px; padding: 40px 0; }
.pf-states-map .pf-tmap { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(8, 1fr); gap: 6px; aspect-ratio: 12 / 8; transform-style: preserve-3d; transform: rotateX(52deg) rotateZ(-10deg) translateY(-4%); transition: transform 1.2s var(--wp--custom--ease); }
.pf-states-map .pf-tile { --h: 0px; position: relative; border-radius: 6px; background: rgba(26, 60, 143, 0.1); border: 1px solid rgba(26, 60, 143, 0.14); display: grid; place-items: center; font-size: clamp(0.5rem, 0.9vw, 0.72rem); font-weight: 700; color: rgba(14, 26, 51, 0.35); transform-style: preserve-3d; transform: translateZ(var(--h)); opacity: 0; transition: transform 0.7s var(--wp--custom--ease), background-color 0.4s, opacity 0.6s; padding: 0; font-family: inherit; }
.pf-states-map.is-in .pf-tile { opacity: 1; transition-delay: calc(var(--d) * 12ms); }
.pf-states-map .pf-tile.srv { --h: 22px; background: var(--wp--preset--color--base); border-color: var(--wp--preset--color--primary); color: var(--wp--preset--color--primary); font-size: clamp(0.6rem, 1.1vw, 0.9rem); cursor: pointer; }
.pf-states-map .pf-tile.srv::before, .pf-states-map .pf-tile.srv::after { content: ""; position: absolute; background: var(--wp--preset--color--primary-light); transition: height 0.7s var(--wp--custom--ease), width 0.7s var(--wp--custom--ease); }
.pf-states-map .pf-tile.srv::before { left: -1px; right: -1px; top: 100%; height: var(--h); transform-origin: top; transform: rotateX(-90deg); background: var(--wp--preset--color--primary-dark); }
.pf-states-map .pf-tile.srv::after { top: -1px; bottom: -1px; left: 100%; width: var(--h); transform-origin: left; transform: rotateY(90deg); }
.pf-states-map .pf-tile.srv:hover { --h: 34px; }
.pf-states-map .pf-tile.srv[aria-selected="true"] { --h: 48px; background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent-dark); color: var(--wp--preset--color--contrast); }
.pf-states-map .pf-tile.srv[aria-selected="true"]::before { background: #b87c0c; }
.pf-states-map .pf-tile.srv[aria-selected="true"]::after { background: var(--wp--preset--color--accent-dark); }
.pf-states-map .pf-map-legend { display: flex; gap: 20px; font-size: 0.88rem; color: var(--wp--preset--color--muted); margin-top: 10px; flex-wrap: wrap; }
.pf-states-map .pf-map-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 8px; }
.pf-states-map .pf-state-btns { display: none; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.pf-states-map .pf-state-btns button { padding: 10px 14px; border-radius: 10px; border: 1.5px solid rgba(14, 26, 51, 0.12); background: transparent; font: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer; }
.pf-states-map .pf-state-btns button[aria-selected="true"] { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--base); border-color: var(--wp--preset--color--primary); }
@media (max-width: 960px) {
	.pf-states-map .pf-states-map__grid { grid-template-columns: 1fr; }
	.pf-states-map .pf-map-stage { padding: 0; }
	.pf-states-map .pf-state-btns { display: flex; }
}
@media (prefers-reduced-motion: reduce) { .pf-states-map .pf-tile { opacity: 1; } }
