/* GOTTA — Interactive US footprint map for license.html
 *
 * Loads /assets/svg/us-states.svg inline at runtime; each state is a <path>
 * with a lowercase 2-letter class (e.g. .nj, .ma). We layer status classes
 * (.live, .target) via CSS attribute selectors, then JS handles hover +
 * detail panel.
 */

.biz-map {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
    margin-top: 2rem;
}

/* ── SVG container ── */
.biz-map__canvas {
    position: relative;
    width: 100%;
    aspect-ratio: 959 / 593;
    background:
        radial-gradient(ellipse 60% 50% at 50% 50%, rgba(201,165,104,0.04), transparent 70%),
        rgba(10, 10, 10, 0.3);
    border: 1px solid rgba(201, 165, 104, 0.12);
    padding: clamp(0.75rem, 2vw, 1.5rem);
    overflow: hidden;
}
.biz-map__canvas svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Border lines between states */
.biz-map__canvas .borders {
    stroke: rgba(10, 10, 10, 0.85);
    stroke-width: 1;
}

/* ── State base — all 50 states default to a subtle outline on dark ── */
.biz-map__canvas .state path {
    fill: rgba(201, 165, 104, 0.045);
    stroke: rgba(201, 165, 104, 0.32);
    stroke-width: 0.6;
    transition: fill 0.25s var(--ease-quiet),
                stroke 0.25s var(--ease-quiet),
                filter 0.25s var(--ease-quiet);
    cursor: default;
}

/* DC circle — hide unless it's a launch state */
.biz-map__canvas .dccircle { display: none; }

/* ── Status colors ── */
/* LIVE — gold filled, brighter outline */
.biz-map__canvas .state path.is-live {
    fill: rgba(201, 165, 104, 0.78);
    stroke: var(--color-crown-gold);
    stroke-width: 1.25;
    cursor: pointer;
}
.biz-map__canvas .state path.is-live:hover,
.biz-map__canvas .state path.is-live:focus-visible {
    fill: var(--color-crown-gold);
    filter: drop-shadow(0 0 8px rgba(201, 165, 104, 0.4));
    outline: none;
}

/* TARGET — dim gold fill, dashed outline */
.biz-map__canvas .state path.is-target {
    fill: rgba(201, 165, 104, 0.18);
    stroke: rgba(201, 165, 104, 0.55);
    stroke-width: 1;
    stroke-dasharray: 3 2;
    cursor: pointer;
}
.biz-map__canvas .state path.is-target:hover,
.biz-map__canvas .state path.is-target:focus-visible {
    fill: rgba(201, 165, 104, 0.35);
    stroke: var(--color-crown-gold);
    stroke-dasharray: none;
    outline: none;
}

/* SELECTED — currently being shown in detail panel */
.biz-map__canvas .state path.is-selected {
    stroke: var(--color-ivory) !important;
    stroke-width: 1.75 !important;
    stroke-dasharray: none !important;
}

/* Floating tooltip */
.biz-map__tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(10, 10, 10, 0.92);
    border: 1px solid rgba(201, 165, 104, 0.35);
    color: var(--color-ivory);
    font-family: var(--ff-text);
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0.5rem 0.75rem;
    transform: translate(-50%, -130%);
    opacity: 0;
    transition: opacity 0.15s;
    white-space: nowrap;
    z-index: 5;
}
.biz-map__tooltip.is-visible { opacity: 1; }
.biz-map__tooltip strong {
    color: var(--color-crown-gold);
    margin-right: 0.5rem;
}

/* ── Detail panel ── */
.biz-map__detail {
    position: sticky;
    top: 100px;
}
.biz-map__detail-card {
    padding: 2rem 1.75rem;
    border: 1px solid rgba(201, 165, 104, 0.2);
    background: rgba(201, 165, 104, 0.04);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.biz-map__detail-status {
    display: inline-block;
    align-self: flex-start;
    font-family: var(--ff-text);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--color-crown-gold);
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(201, 165, 104, 0.4);
    border-radius: 999px;
}
.biz-map__detail-status--live {
    color: var(--color-onyx);
    background: var(--color-crown-gold);
    border-color: var(--color-crown-gold);
}
.biz-map__detail-state {
    font-family: var(--ff-display);
    font-size: clamp(2rem, 2.5vw + 0.8rem, 3rem);
    font-weight: 400;
    color: var(--color-ivory);
    line-height: 1.05;
    margin: 0;
    letter-spacing: -0.01em;
}
.biz-map__detail-state em {
    font-style: italic;
    color: var(--color-crown-gold);
}
.biz-map__detail-body {
    font-family: var(--ff-text);
    font-size: 0.9rem;
    color: rgba(246, 241, 232, 0.7);
    line-height: 1.65;
    margin: 0;
}
.biz-map__detail-meta {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(201, 165, 104, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
.biz-map__detail-meta li {
    font-family: var(--ff-text);
    font-size: 0.78rem;
    color: rgba(246, 241, 232, 0.65);
    letter-spacing: 0.01em;
}
.biz-map__detail-meta strong {
    color: var(--color-crown-gold);
    font-weight: 600;
    margin-right: 0.5rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.62rem;
}
.biz-map__detail-cta {
    margin-top: 0.5rem;
    font-family: var(--ff-text);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-crown-gold);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
    align-self: flex-start;
    transition: letter-spacing 0.25s var(--ease-quiet);
}
.biz-map__detail-cta:hover,
.biz-map__detail-cta:focus-visible { letter-spacing: 0.26em; }

/* ── Legend ── */
.biz-map__legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}
.biz-map__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--ff-text);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(246, 241, 232, 0.55);
}
.biz-map__legend-swatch {
    width: 0.9rem;
    height: 0.9rem;
    border: 1px solid rgba(201, 165, 104, 0.4);
}
.biz-map__legend-swatch--live {
    background: var(--color-crown-gold);
    border-color: var(--color-crown-gold);
}
.biz-map__legend-swatch--target {
    background: rgba(201, 165, 104, 0.2);
    border-style: dashed;
}
.biz-map__legend-swatch--inactive {
    background: rgba(201, 165, 104, 0.04);
    border-color: rgba(201, 165, 104, 0.18);
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .biz-map {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .biz-map__detail {
        position: static;
    }
    .biz-map__detail-card { min-height: auto; padding: 1.5rem; }
}
@media (max-width: 560px) {
    .biz-map__tooltip { display: none; }
    .biz-map__legend { gap: 1rem; }
}
