/* 
 * Geo-Map Styles for MrWin Reports
 * Premium, interactive world map visualization
 */

.outage-issues-box.has-map {
    max-width: 1200px;
    margin: 40px auto;
}

.outage-issues-flex-wrapper {
    display: flex;
    flex-direction: column;
    gap: 40px;
    align-items: center;
    justify-content: flex-start;
    margin-top: 32px;
    width: 100%;
}

/* Share space: Vertically stacked */
.outage-specific-issues {
    width: 100%;
}

.outage-geo-map-container {
    width: 100%;
    position: relative;
    background: rgba(128, 128, 128, 0.03); /* More neutral background */
    border-radius: 16px;
    padding: 10px;
    border: 1px solid rgba(128, 128, 128, 0.08);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: block;
    overflow: hidden;
}

/* Skeleton animation */
.outage-geo-map-container.loading-skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(150, 150, 150, 0),
        rgba(150, 150, 150, 0.05),
        rgba(150, 150, 150, 0)
    );
    animation: skeleton-shimmer 2s infinite linear;
}

@keyframes skeleton-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.outage-geo-map {
    width: 100%;
    line-height: 0; /* Remove potential whitespace */
}

#world-map {
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.2));
    height: auto;
    width: 100%;
    display: block;
    max-height: 80vh; /* Don't let it get vertically absurd on ultra-wide */
}

/* Default state for countries - Pronounced for better contrast */
.outage-geo-map path, 
.outage-geo-map g[id] {
    transition: fill 0.3s cubic-bezier(0.4, 0, 0.2, 1), filter 0.3s ease;
    cursor: pointer;
    fill: rgba(0, 0, 0, 0.12); /* Darker grey on light theme */
}

.outage-geo-map path:hover, 
.outage-geo-map g[id]:hover {
    fill-opacity: 0.7 !important;
}

/* Active outage state */
.outage-geo-map .status-success,
.outage-geo-map .status-success path {
    fill: var(--status-success) !important;
}

.outage-geo-map .status-warning,
.outage-geo-map .status-warning path {
    fill: var(--status-warning) !important;
}

.outage-geo-map .status-critical,
.outage-geo-map .status-critical path {
    fill: var(--status-critical) !important;
}

/* Pulsing markers for small countries */
.small-country-marker {
    cursor: pointer;
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 1px;
    animation: pulse-marker 2s infinite ease-in-out;
}

@keyframes pulse-marker {
    0% {
        r: 4;
        opacity: 1;
    }
    50% {
        r: 7;
        opacity: 0.6;
    }
    100% {
        r: 4;
        opacity: 1;
    }
}

/* Premium Tooltip */
.outage-map-tooltip {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
    background: rgba(20, 20, 20, 0.9);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 6px 10px; /* Leaner padding */
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    transform: translate(0, 0);
    transition: opacity 0.2s ease;
}

.outage-map-tooltip strong {
    display: block;
    margin-bottom: 0; /* Removed margin */
    font-size: 13px;
    opacity: 0.9;
}

.outage-map-tooltip span {
    display: block;
    font-weight: 600;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.7);
}

/* Dark mode adjustments */
body.dark-mode .outage-geo-map-container {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-mode .outage-geo-map path,
body.dark-mode .outage-geo-map g[id] {
    fill: rgba(255, 255, 255, 0.15); /* Lighter grey on dark theme */
}
