/* ========================================
   ASEAN MAP - SIMPLE VERSION
   Static Image + Overlay Markers
   ======================================== */

/* Map Wrapper */
.cstm-asean-map-wrapper {
    padding: 20px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

/* Map Container */
.cstm-map-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    border: 3px solid #3b82f6;
    background: #f8fafc;
}

/* Map Image */
.cstm-map-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Markers Container */
.cstm-map-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Individual Marker */
.cstm-marker {
    position: absolute;
    pointer-events: all;
    cursor: pointer;
    z-index: 10;
}

/* Marker Pin (Yellow Dot) */
.cstm-marker-pin {
    width: 24px;
    height: 24px;
    background: #fbbf24;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.5);
    position: relative;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.cstm-marker-pin::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ffffff;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Pulse Animation */
.cstm-marker-pin::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid #fbbf24;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: cstm-marker-pulse 2s ease-out infinite;
}

@keyframes cstm-marker-pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

/* Tooltip */
.cstm-marker-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background: rgba(255, 255, 255, 0.98);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 100;
}

.cstm-marker-tooltip::before {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(255, 255, 255, 0.98);
}

.cstm-marker-tooltip strong {
    display: block;
    color: #1e293b;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.cstm-marker-tooltip p {
    margin: 0;
    color: #64748b;
    font-size: 0.85rem;
}

/* Show Tooltip on Hover */
.cstm-marker:hover .cstm-marker-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

.cstm-marker:hover .cstm-marker-pin {
    transform: translate(-50%, -50%) scale(1.2);
    background: #f59e0b;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.6);
}

/* Map Title Overlay */
.cstm-map-title {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    z-index: 5;
}

.cstm-map-title p {
    margin: 0;
    line-height: 1.4;
}

.cstm-map-title p:first-child {
    color: #dc2626;
    font-weight: 600;
    font-size: 1rem;
}

.cstm-map-title p:last-child {
    color: #dc2626;
    font-size: 0.85rem;
}

/* Legend */
.cstm-map-legend {
    text-align: center;
    padding: 15px;
    background: #f8fafc;
    border-radius: 10px;
}

.cstm-legend-icon {
    width: 16px;
    height: 16px;
    background: #fbbf24;
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.4);
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablet */
@media (max-width: 992px) {
    .cstm-marker-pin {
        width: 20px;
        height: 20px;
    }

    .cstm-marker-tooltip {
        font-size: 0.85rem;
    }

    .cstm-map-title p:first-child {
        font-size: 0.9rem;
    }

    .cstm-map-title p:last-child {
        font-size: 0.75rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .cstm-asean-map-wrapper {
        padding: 15px;
    }

    .cstm-map-container {
        border-width: 2px;
    }

    .cstm-marker-pin {
        width: 18px;
        height: 18px;
        border-width: 2px;
    }

    /* Always show tooltips on mobile (no hover) */
    .cstm-marker-tooltip {
        display: none;
    }

    /* Show on tap/click */
    .cstm-marker.active .cstm-marker-tooltip {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .cstm-map-title {
        top: 10px;
        padding: 6px 12px;
    }

    .cstm-map-title p:first-child {
        font-size: 0.8rem;
    }

    .cstm-map-title p:last-child {
        font-size: 0.7rem;
    }

    .cstm-map-legend {
        font-size: 0.85rem;
    }
}

/* Small Mobile */
@media (max-width: 576px) {
    .cstm-marker-pin {
        width: 16px;
        height: 16px;
    }

    .cstm-map-legend .row {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

/* Marker Entrance Animation */
.cstm-marker {
    animation: cstm-marker-drop 0.6s ease-out backwards;
}

.cstm-marker:nth-child(1) {
    animation-delay: 0.1s;
}
.cstm-marker:nth-child(2) {
    animation-delay: 0.2s;
}
.cstm-marker:nth-child(3) {
    animation-delay: 0.3s;
}
.cstm-marker:nth-child(4) {
    animation-delay: 0.4s;
}
.cstm-marker:nth-child(5) {
    animation-delay: 0.5s;
}
.cstm-marker:nth-child(6) {
    animation-delay: 0.6s;
}
.cstm-marker:nth-child(7) {
    animation-delay: 0.7s;
}

@keyframes cstm-marker-drop {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   MOBILE TOUCH INTERACTIONS
   ======================================== */

/* Mobile: Click to show tooltip */
@media (hover: none) {
    .cstm-marker-tooltip {
        opacity: 0;
        visibility: hidden;
    }

    .cstm-marker.active .cstm-marker-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(-5px);
    }
}
