﻿/* Cyber Threat Intelligence World Map */
/* Professional global threat visualization */

/* Map Container */
.threat-map-container {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
    position: relative;
}

.threat-map-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-lg);
    flex-wrap: wrap;
    gap: var(--space-md);
}

.threat-map-title {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.threat-map-title h2 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    color: #ffffff;
    margin: 0;
    letter-spacing: -0.01em;
}

.threat-live-indicator {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.threat-live-dot {
    width: 6px;
    height: 6px;
    background: var(--color-text-tertiary);
    border-radius: 50%;
}

/* Stats Bar */
.threat-stats-bar {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.threat-stat-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.threat-stat-value {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    color: #ffffff;
    line-height: 1;
}

.threat-stat-label {
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Map SVG Wrapper */
.threat-map-svg-wrapper {
    position: relative;
    width: 100%;
    height: 500px;
    background: var(--color-bg-canvas);
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--color-border-subtle);
}

.threat-map-svg {
    width: 100%;
    height: 100%;
}

.threat-map-svg image {
    opacity: 1;
}

/* World Map Styling - Override SVG defaults */
.threat-map-svg :global(path),
.threat-map-svg :global(.land),
.threat-map-svg path,
.threat-map-svg image {
    fill: var(--color-surface-container) !important;
    stroke: var(--color-border-default) !important;
    stroke-width: 0.8 !important;
    transition: fill 0.2s ease;
}

.threat-map-svg :global(path:hover),
.threat-map-svg :global(.land:hover) {
    fill: var(--color-surface-container-high) !important;
}

/* Enhanced visibility for embedded world map */
.threat-map-svg image {
    image-rendering: auto;
    shape-rendering: geometricPrecision;
}

/* Region Markers */
.region-marker {
    cursor: pointer;
}

/* Threat Markers */
.threat-marker {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.threat-marker:hover {
    opacity: 0.7;
}

.threat-marker-core {
    fill: currentColor;
    stroke: var(--color-bg-canvas);
    stroke-width: 1;
}

/* Threat Legend */
.threat-legend {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-subtle);
    flex-wrap: wrap;
}

.threat-legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.threat-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

/* Threat Tooltip */
.threat-tooltip {
    position: absolute;
    background: rgba(12, 14, 20, 0.98);
    border: 1px solid var(--color-border-default);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1000;
    min-width: 250px;
    box-shadow: var(--shadow-large);
    backdrop-filter: blur(10px);
}

.threat-tooltip.active {
    opacity: 1;
}

.threat-tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-sm);
    gap: var(--space-sm);
}

.threat-tooltip-country {
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: #ffffff;
}

.threat-tooltip-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.threat-tooltip-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.threat-tooltip-label {
    color: var(--color-text-tertiary);
}

.threat-tooltip-value {
    color: #ffffff;
    font-weight: var(--font-weight-medium);
}

.threat-tooltip-description {
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
    border-top: 1px solid var(--color-border-subtle);
    font-size: var(--font-size-xs);
    color: var(--color-text-tertiary);
    line-height: var(--line-height-relaxed);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .threat-map-svg-wrapper {
        height: 350px;
    }

    .threat-stats-bar {
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .threat-map-svg-wrapper {
        height: 300px;
    }

    .threat-map-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .threat-stats-bar {
        width: 100%;
        justify-content: space-between;
    }

    .threat-stat-item {
        flex: 1;
    }

    .threat-legend {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .threat-tooltip {
        min-width: 200px;
        font-size: var(--font-size-xs);
    }
}

/* Print Styles */
@media print {
    .threat-map-container {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .threat-marker-pulse {
        animation: none;
    }

    .threat-live-dot {
        animation: none;
    }
}
