/* World Map Component Styles */
.world-map-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.world-map-mobile {
    display: none;
}

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

/* Base country styling */
.world-map-svg path {
    fill: #ccc;
    stroke: transparent;
    stroke-width: 1px;
    transition: fill 0.2s ease;
}

/* Active countries - darker shade with light border */
.world-map-svg path.active {
    fill: #888;
    stroke: rgba(255, 255, 255, 0.6);
    stroke-width: 1.5px;
    cursor: pointer;
}

/* Hover state for active countries */
.world-map-svg path.active:hover,
.world-map-svg path.active.hover {
    fill: #555;
}

/* Tooltip container */
.map-tooltip {
    position: fixed;
    pointer-events: none;
    z-index: 1000;
}

/* Animated line - default state (hidden) */
.tooltip-line {
    position: absolute;
    top: 0;
    height: 2px;
    background: rgba(0, 0, 0, 0.85);
    width: 0;
    transition: width 0.25s ease-out;
}

/* Direction: line goes RIGHT */
.map-tooltip.direction-right .tooltip-line {
    left: 0;
}

.map-tooltip.direction-right .tooltip-box {
    left: 60px;
    transform: translateY(-50%);
}

/* Direction: line goes LEFT */
.map-tooltip.direction-left .tooltip-line {
    right: 0;
    left: auto;
}

.map-tooltip.direction-left .tooltip-box {
    right: 60px;
    left: auto;
    transform: translateY(-50%);
}

/* LINE: Animate in (when .line-visible) */
.map-tooltip.line-visible .tooltip-line {
    width: 60px;
    transition: width 0.25s ease-out;
}

/* LINE: Animate out (when .line-hiding) - delayed to let box fade first */
.map-tooltip.line-hiding .tooltip-line {
    width: 0;
    transition: width 0.25s ease-in 0.15s;
}

/* Info box styling */
.tooltip-box {
    position: absolute;
    top: 0;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 20px 24px;
    font-family: 'Made Tommy Regular', sans-serif;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%);
    transition: opacity 0.15s ease-out, visibility 0s linear 0.15s;
    min-width: 280px;
    max-width: 450px;
}

/* BOX: Show (when .box-visible) - delayed to let line draw first */
.map-tooltip.box-visible .tooltip-box {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.15s ease-out 0.25s, visibility 0s linear 0s;
}

/* BOX: Hide immediately when leaving */
.map-tooltip.box-hiding .tooltip-box {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.12s ease-out, visibility 0s linear 0.12s;
}

.tooltip-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    font-family: 'Made Tommy Medium', sans-serif;
}

.tooltip-stats {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
}

.tooltip-stats span {
    display: inline-block;
}

/* Custom HTML content for countries */
.tooltip-content {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    white-space: normal;
}

.tooltip-content p {
    margin: 0 0 10px 0;
}

.tooltip-content p:last-child {
    margin-bottom: 0;
}

.tooltip-content strong {
    color: #fff;
    font-family: 'Made Tommy Medium', sans-serif;
}

/* Responsive tooltip sizing */
@media (max-width: 1200px) {
    .tooltip-box {
        min-width: 260px;
        max-width: 400px;
        padding: 18px 22px;
    }
    
    .tooltip-content {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .world-map-hotspot {
        display: none;
    }

    .world-map-mobile {
        display: block;
        margin-top: 24px;
    }

    .world-map-mobile-list {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 18px;
    }

    .world-map-mobile-country {
        appearance: none;
        border: 1px solid rgba(0, 0, 0, 0.18);
        background: #fff;
        color: #000;
        padding: 10px 14px;
        font-family: 'Made Tommy Regular', sans-serif;
        font-size: 0.9rem;
        line-height: 1.2;
        cursor: pointer;
        transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    }

    .world-map-mobile-country.active {
        background: #000;
        color: #fff;
        border-color: #000;
    }

    .world-map-mobile-detail {
        background: rgba(0, 0, 0, 0.9);
        color: #fff;
        padding: 18px 20px;
    }

    .world-map-mobile-detail .tooltip-title {
        font-size: 15px;
        margin-bottom: 10px;
    }

    .world-map-mobile-detail .tooltip-content {
        font-size: 12px;
        line-height: 1.5;
    }

    .world-map-mobile-detail .tooltip-content strong {
        color: #fff;
    }

    .map-tooltip {
        display: none;
    }

    .tooltip-box {
        min-width: 220px;
        max-width: 320px;
        padding: 16px 20px;
    }
    
    .tooltip-title {
        font-size: 15px;
        margin-bottom: 8px;
    }
    
    .tooltip-content {
        font-size: 12px;
        line-height: 1.5;
    }
    
    .tooltip-stats {
        gap: 15px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .tooltip-box {
        min-width: 200px;
        max-width: 280px;
        padding: 14px 18px;
    }
    
    .tooltip-title {
        font-size: 14px;
    }
    
    .tooltip-content {
        font-size: 11px;
    }
    
    .tooltip-content p {
        margin: 0 0 8px 0;
    }
}
