/**
 * SIGRID — Core Styles & Plotting Marker Animations
 * PT Siger Intermedia Teknologi
 */

/* Marker Pin Base */
.unit-pin {
    position: absolute;
    left: calc(var(--coord-x) * 1%);
    top: calc(var(--coord-y) * 1%);
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    user-select: none;
}

.unit-pin:hover {
    transform: translate(-50%, -50%) scale(1.25);
    z-index: 30;
}

.unit-pin.is-dragging {
    opacity: 0.8;
    transform: translate(-50%, -50%) scale(1.3);
    z-index: 40;
    cursor: grabbing;
}

.unit-pin.is-focused {
    transform: translate(-50%, -50%) scale(1.4);
    z-index: 35;
    animation: pin-bounce 1s infinite alternate ease-in-out;
}

@keyframes pin-bounce {
    0% { transform: translate(-50%, -50%) scale(1.3); }
    100% { transform: translate(-50%, -70%) scale(1.4); }
}

/* Radar pulse ring for focused search */
.pin-radar {
    position: absolute;
    inset: -8px;
    border-radius: 9999px;
    animation: radar-pulse 1.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
    pointer-events: none;
}

@keyframes radar-pulse {
    0% {
        transform: scale(0.6);
        opacity: 0.9;
    }
    100% {
        transform: scale(2.4);
        opacity: 0;
    }
}

/* Marker Pill Visuals */
.pin-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: -0.02em;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.9);
    white-space: nowrap;
}

/* Status variants */
.unit-pin[data-status="tersedia"] .pin-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}
.unit-pin[data-status="tersedia"] .pin-radar {
    border: 2px solid #10b981;
}

.unit-pin[data-status="dipesan"] .pin-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}
.unit-pin[data-status="dipesan"] .pin-radar {
    border: 2px solid #f59e0b;
}

.unit-pin[data-status="terjual"] .pin-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    opacity: 0.9;
}
.unit-pin[data-status="terjual"] .pin-radar {
    border: 2px solid #ef4444;
}

/* Popover Card Animations */
@keyframes popIn {
    from {
        opacity: 0;
        transform: translateY(6px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.animate-pop-in {
    animation: popIn 0.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.2s ease-out forwards;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
    background: rgba(51, 65, 85, 0.8);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 1);
}
