/* FTC baseline + state overlay map (Tax & Accounting) */

.us-map-container {
    max-width: 900px;
    margin: 0 auto;
}

.us-map-wrapper {
    position: relative;
    background: linear-gradient(135deg, #F8FAFC 0%, #EEF2FF 100%);
    border-radius: var(--gov-radius, 16px);
    padding: 32px;
    border: 1px solid var(--gov-border-color, rgba(15, 23, 42, 0.10));
    box-shadow: var(--gov-shadow, 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05));
}

.us-map {
    width: 100%;
    height: auto;
    display: block;
}

.us-map .state {
    fill: #E2E8F0;
    stroke: #CBD5E1;
    stroke-width: 0.5;
    cursor: pointer;
    transition: all 0.2s ease;
}

.us-map .state--overlay {
    fill: #DCFCE7;
    stroke: #16A34A;
    stroke-width: 0.9;
}

.us-map .state--baseline {
    fill: #DBEAFE;
    stroke: #3B82F6;
    stroke-width: 0.6;
}

.us-map .state--overlay:hover,
.us-map .state--overlay.state--highlight {
    fill: #16A34A;
    stroke: #15803D;
    filter: drop-shadow(0 4px 10px rgba(22, 163, 74, 0.20));
}

.us-map .state--baseline:hover,
.us-map .state--baseline.state--highlight {
    fill: #3B82F6;
    stroke: #2563EB;
    filter: drop-shadow(0 4px 10px rgba(59, 130, 246, 0.18));
}

/* Tooltip */
.us-map-tooltip {
    position: absolute;
    background: #FFFFFF;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.15);
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 100;
    min-width: 280px;
    max-width: 320px;
    --tooltip-accent: #3B82F6;
}

.map-legend .legend-dot.overlay {
    background: #DCFCE7;
    border: 2px solid #16A34A;
}

.map-legend .legend-dot.baseline {
    background: #DBEAFE;
    border: 2px solid #3B82F6;
}

.us-map-tooltip.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.us-map-tooltip.pinned {
    pointer-events: auto;
}

.us-map-tooltip .tooltip-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.us-map-tooltip .tooltip-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.us-map-tooltip .tooltip-close {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(15, 23, 42, 0.02);
    color: #0F172A;
    font-size: 18px;
    line-height: 1;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.us-map-tooltip.pinned .tooltip-close {
    display: inline-flex;
}

.us-map-tooltip .tooltip-close:hover {
    background: rgba(15, 23, 42, 0.06);
}

.us-map-tooltip .tooltip-close:focus-visible {
    outline: 2px solid var(--tooltip-accent);
    outline-offset: 2px;
}

.us-map-tooltip .tooltip-badge {
    background: var(--tooltip-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.us-map-tooltip .tooltip-name {
    font-size: 18px;
    font-weight: 700;
    color: #0F172A;
}

.us-map-tooltip .tooltip-law {
    font-size: 13px;
    color: #64748B;
    font-weight: 600;
    margin-bottom: 12px;
    border-bottom: 1px solid #F1F5F9;
    padding-bottom: 12px;
}

.us-map-tooltip .tooltip-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.us-map-tooltip .tooltip-bullets li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #334155;
    margin-bottom: 6px;
    line-height: 1.4;
}

.us-map-tooltip .tooltip-bullets li::before {
    content: "•";
    color: var(--tooltip-accent);
    font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
    .us-map .state {
        transition: none;
    }

    .us-map-tooltip {
        transition: none;
        transform: none;
    }

    .us-map-tooltip.visible {
        transform: none;
    }
}

@media (max-width: 640px) {
    .us-map-wrapper { padding: 18px; }
    .us-map-tooltip {
        min-width: 0;
        width: min(360px, calc(100% - 24px));
        max-width: none;
    }
}
