/* ==========================================
   LEGEND PANEL - FUTURISTIC STYLE V1.2
   ========================================== */

/* Wrapper Utama Legenda di Pojok Kanan Bawah */
.legend-wrapper {
    position: absolute;
    bottom: 25px;
    right: 25px;
    z-index: 1000;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Status Tersembunyi (Slide keluar layar ke kanan) */
.legend-wrapper.collapsed {
    transform: translateX(calc(100% + 30px));
}

/* Tombol Penanda Buka/Tutup yang Tetap Muncul di Luar Layar */
.legend-toggle-btn {
    position: absolute;
    left: -115px;
    top: 0;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Orbitron', sans-serif;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.legend-toggle-btn:hover {
    background: rgba(30, 41, 59, 0.95);
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

/* Kontainer Daftar Item Legenda */
.legend-container { 
    max-height: 180px; 
    overflow-y: auto; 
    padding-right: 4px;
    margin-top: 6px;
}

/* Kustomisasi Scrollbar untuk Legend */
.legend-container::-webkit-scrollbar {
    width: 4px;
}
.legend-container::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 4px;
}

.legend-item { 
    display: flex; 
    align-items: center; 
    margin-bottom: 6px; 
    font-size: 12px; 
    color: #cbd5e1;
    font-weight: 500;
}
.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color { 
    width: 22px; 
    height: 14px; 
    margin-right: 10px; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    flex-shrink: 0; 
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
